浏览代码

Bug 709826 - Memory leak: when extra referrals configured

https://bugzilla.redhat.com/show_bug.cgi?id=709826

Description: "referrals" allocated in ber_scanf called with "[v]"
option is an array of chars.  It should have been freed by
slapi_ch_array_free, but slapi_ch_free was actually called, which
does not releases the real strings, but just the array of pointers.

This patch calls slapi_ch_array_free.
Noriko Hosoi 14 年之前
父节点
当前提交
5a6518b567
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      ldap/servers/plugins/replication/repl_extop.c

+ 2 - 2
ldap/servers/plugins/replication/repl_extop.c

@@ -1083,8 +1083,8 @@ send_response:
 	{
 		ruv_destroy (&supplier_ruv);
 	}
-	/* referrals */
-	slapi_ch_free((void **)&referrals);
+	/* referrals (char **) */
+	slapi_ch_array_free(referrals);
 
 	/* replicacsnstr */
 	slapi_ch_free((void **)&replicacsnstr);