[Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm vlv.c, 1.14, 1.15
Noriko Hosoi (nhosoi)
fedora-directory-commits at redhat.com
Tue Oct 2 23:21:35 UTC 2007
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21406
Modified Files:
vlv.c
Log Message:
Resolves: #314851
Summary: vlv: crash after repeated backend creation/deletion
Description: added a check code for the backend's existing.
Index: vlv.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/vlv.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- vlv.c 24 Sep 2007 18:27:15 -0000 1.14
+++ vlv.c 2 Oct 2007 23:21:31 -0000 1.15
@@ -76,6 +76,9 @@
struct vlvSearch* newVlvSearch= vlvSearch_new();
backend *be = inst->inst_be;
+ if (NULL == be) { /* backend is not associated */
+ return SLAPI_DSE_CALLBACK_ERROR;
+ }
vlvSearch_init(newVlvSearch, pb, entryBefore, inst);
/* vlvSearchList is modified; need Wlock */
PR_RWLock_Wlock(be->vlvSearchList_lock);
@@ -280,6 +283,9 @@
ldbm_instance *inst = (ldbm_instance*)arg;
backend *be= inst->inst_be;
+ if (NULL == be) { /* backend is not associated */
+ return SLAPI_DSE_CALLBACK_ERROR;
+ }
vlvSearch_init(newVlvSearch, pb, entryBefore, inst);
vlvSearch_addtolist(newVlvSearch, (struct vlvSearch **)&be->vlvSearchList);
return SLAPI_DSE_CALLBACK_OK;
More information about the Fedora-directory-commits
mailing list