diff options
-rw-r--r-- | ldap/servers/plugins/replication/cl4_api.c | 4 | ||||
-rw-r--r-- | ldap/servers/plugins/replication/windows_protocol_util.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/ldap/servers/plugins/replication/cl4_api.c b/ldap/servers/plugins/replication/cl4_api.c index 07bf7b24..c7d0ce02 100644 --- a/ldap/servers/plugins/replication/cl4_api.c +++ b/ldap/servers/plugins/replication/cl4_api.c @@ -263,7 +263,7 @@ static int _cl4WriteOperation (const slapi_operation_parameters *op) { int rc = CL4_SUCCESS, res; char *changeEntryDN, *timeStr; - Slapi_Entry *e; + Slapi_Entry *e = NULL; Slapi_PBlock *pb = NULL; Slapi_Value *values[3]; char s[CSN_STRSIZE]; @@ -364,6 +364,7 @@ static int _cl4WriteOperation (const slapi_operation_parameters *op) pb = slapi_pblock_new (pb); slapi_add_entry_internal_set_pb (pb, e, NULL, repl_get_plugin_identity (PLUGIN_LEGACY_REPLICATION), 0); slapi_add_internal_pb (pb); + e = NULL; /* add consumes entry */ slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &res); slapi_pblock_destroy(pb); @@ -380,6 +381,7 @@ static int _cl4WriteOperation (const slapi_operation_parameters *op) } done: + slapi_entry_free(e); if (changeEntryDN) slapi_ch_free((void **) &changeEntryDN); diff --git a/ldap/servers/plugins/replication/windows_protocol_util.c b/ldap/servers/plugins/replication/windows_protocol_util.c index 8cd5bdfa..ed5b8a32 100644 --- a/ldap/servers/plugins/replication/windows_protocol_util.c +++ b/ldap/servers/plugins/replication/windows_protocol_util.c @@ -3477,6 +3477,7 @@ windows_create_local_entry(Private_Repl_Protocol *prp,Slapi_Entry *remote_entry, 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 @@ windows_create_local_entry(Private_Repl_Protocol *prp,Slapi_Entry *remote_entry, "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) { |