Browse Source

Bug 617630 - fix coverify Defect Type: Resource leaks issues CID 12052 - 12093

https://bugzilla.redhat.com/show_bug.cgi?id=617630
Resolves: bug 617630
Bug description: fix coverify Defect Type: Resource leaks issues CID 12054
description: windows_private_save_dirsync_cookie() has been modified to release previously allocated mods.
Endi S. Dewata 15 years ago
parent
commit
c127e0be83
1 changed files with 1 additions and 0 deletions
  1. 1 0
      ldap/servers/plugins/replication/windows_private.c

+ 1 - 0
ldap/servers/plugins/replication/windows_private.c

@@ -737,6 +737,7 @@ windows_private_save_dirsync_cookie(const Repl_Agmt *ra)
 
     if (rc == LDAP_NO_SUCH_ATTRIBUTE)
     {	/* try again, but as an add instead */
+		slapi_mods_free(&mods);
 		mods = windows_private_get_cookie_mod(dp, LDAP_MOD_ADD);
 		slapi_modify_internal_set_pb (pb, dn, slapi_mods_get_ldapmods_byref(mods), NULL, NULL, 
                                       repl_get_plugin_identity(PLUGIN_MULTIMASTER_REPLICATION), 0);