Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/replication
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1393
Modified Files:
windows_protocol_util.c
Log Message:
Resolves: bug 486191
Description: slapd hang during cs80 cloning setup.
Fix Description: Not exactly related to the bug, but Noriko found a couple of places
during investigation of internal add operations where the Slapi_Entry* could be leaked
upon error. These fixes ensure that the entry is properly freed in case of error.
Index: windows_protocol_util.c
===================================================================
RCS file:
/cvs/dirsec/ldapserver/ldap/servers/plugins/replication/windows_protocol_util.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- windows_protocol_util.c 4 Feb 2009 20:40:34 -0000 1.51
+++ windows_protocol_util.c 19 Feb 2009 23:39:50 -0000 1.52
@@ -3477,6 +3477,7 @@
pb = slapi_pblock_new();
slapi_add_entry_internal_set_pb(pb, local_entry,
NULL,repl_get_plugin_identity(PLUGIN_MULTIMASTER_REPLICATION),0);
slapi_add_internal_pb(pb);
+ local_entry = NULL; /* consumed by add */
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &retval);
if (retval) {
@@ -3484,6 +3485,7 @@
"add operation of entry %s returned: %d\n", slapi_sdn_get_dn(local_sdn),
retval);
}
error:
+ slapi_entry_free(local_entry);
slapi_ch_free_string(&guid_str);
if (pb)
{
Show replies by date