Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15322
Modified Files:
Tag: Directory71RtmBranch
vlv.c
Log Message:
Resolves: #314851
Summary: vlv: crash after repeated backend creation/deletion
Description: applied the patch to Directory71RtmBranch
Index: vlv.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/vlv.c,v
retrieving revision 1.6.2.3
retrieving revision 1.6.2.4
diff -u -r1.6.2.3 -r1.6.2.4
--- vlv.c 11 Jan 2008 01:02:52 -0000 1.6.2.3
+++ vlv.c 11 Jan 2008 03:06:04 -0000 1.6.2.4
@@ -71,6 +71,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);
@@ -275,6 +278,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;
Show replies by date