瀏覽代碼

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 年之前
父節點
當前提交
c127e0be83
共有 1 個文件被更改,包括 1 次插入0 次删除
  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);