ldap/servers/plugins/replication/windows_private.c | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit ba1f5b2ab8a5a68696926393b3eb7b72b11467cc
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Tue Aug 28 14:18:54 2012 -0600
fix coverity resource leak in windows_plugin_add
13056 Resource leak
In windows_plugin_add(): Leak of memory or pointers to system resources (CWE-404)
(cherry picked from commit ba92e5287970d09c4c280eda56c4e58bc064a2c1)
diff --git a/ldap/servers/plugins/replication/windows_private.c
b/ldap/servers/plugins/replication/windows_private.c
index 66e1e98..355abd5 100644
--- a/ldap/servers/plugins/replication/windows_private.c
+++ b/ldap/servers/plugins/replication/windows_private.c
@@ -1246,6 +1246,8 @@ windows_plugin_add(void **theapi, int maxapi)
PR_INSERT_BEFORE(wpi, elem);
wpi = NULL; /* owned by list now */
}
+ /* if we got here and wpi is not NULL we need to free wpi */
+ slapi_ch_free((void **)&wpi);
return 0;
}
return -1;
Show replies by thread