[389-commits] Branch '389-ds-base-1.2.11' - ldap/servers

Richard Allen Megginson rmeggins at fedoraproject.org
Tue Aug 28 20:20:21 UTC 2012


 ldap/servers/plugins/replication/windows_private.c |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit ba1f5b2ab8a5a68696926393b3eb7b72b11467cc
Author: Rich Megginson <rmeggins at 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;




More information about the 389-commits mailing list