This is an automated email from the git hooks/post-receive script.
lkrispen pushed a commit to branch master in repository 389-ds-base.
commit d970649214cad32d739a4d5d709778105a3685e7 Author: Ludwig Krispenz lkrispen@redhat.com Date: Mon Feb 12 16:27:03 2018 +0100
Ticket 49551 - fix memory leak found by coverity --- ldap/servers/plugins/replication/repl5_replica.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/ldap/servers/plugins/replication/repl5_replica.c b/ldap/servers/plugins/replication/repl5_replica.c index f530ce0..e537928 100644 --- a/ldap/servers/plugins/replication/repl5_replica.c +++ b/ldap/servers/plugins/replication/repl5_replica.c @@ -3003,6 +3003,7 @@ process_reap_entry(Slapi_Entry *entry, void *cb_data) if the value is set in the replica, we will know about it immediately */ PRBool *tombstone_reap_stop = ((reap_callback_data *)cb_data)->tombstone_reap_stop; const CSN *deletion_csn = NULL; + int deletion_csn_free = 0; int rc = -1;
/* abort reaping if we've been told to stop or we're shutting down */ @@ -3025,6 +3026,7 @@ process_reap_entry(Slapi_Entry *entry, void *cb_data) char *tombstonecsn = slapi_entry_attr_get_charptr(entry, SLAPI_ATTR_TOMBSTONE_CSN); if (tombstonecsn) { deletion_csn = csn_new_by_string(tombstonecsn); + deletion_csn_free = 1; slapi_ch_free_string(&tombstonecsn); } } @@ -3057,6 +3059,9 @@ process_reap_entry(Slapi_Entry *entry, void *cb_data) /* Don't update the count for the database tombstone entry */ (*num_entriesp)++; } + if (deletion_csn_free) { + csn_free(&deletion_csn); + }
return 0; }