From 16b151c38f14f9ca7eed6611df44c1c5d1fca42f Mon Sep 17 00:00:00 2001 From: Endi Sukma Dewata Date: Fri, 17 Sep 2010 16:58:53 -0400 Subject: Bug 630092 - Coverity #12000: Resource leaks issues https://bugzilla.redhat.com/show_bug.cgi?id=630092 Description: The plugin_setup() has been modified to release the value before it returns. --- ldap/servers/slapd/plugin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ldap/servers/slapd/plugin.c b/ldap/servers/slapd/plugin.c index aa544269..b8257d1b 100644 --- a/ldap/servers/slapd/plugin.c +++ b/ldap/servers/slapd/plugin.c @@ -2270,6 +2270,7 @@ plugin_setup(Slapi_Entry *plugin_entry, struct slapi_componentid *group, plugin->plg_initfunc, plugin->plg_name, plugin->plg_libpath); status = -1; + slapi_ch_free((void**)&value); goto PLUGIN_CLEANUP; } @@ -2277,8 +2278,7 @@ plugin_setup(Slapi_Entry *plugin_entry, struct slapi_componentid *group, status = plugin_add_descriptive_attributes( plugin_entry, plugin ); } - if (value) - slapi_ch_free((void**)&value); + slapi_ch_free((void**)&value); if(enabled) { -- cgit