summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2010-09-17 16:58:53 -0400
committerNathan Kinder <nkinder@redhat.com>2010-09-17 14:40:11 -0700
commit16b151c38f14f9ca7eed6611df44c1c5d1fca42f (patch)
treeb5c4f49614a814d035d98e9f68d34e9bdd6c764f
parenta076dbbf8eefee8c84b0c7af12f9d2819db11452 (diff)
downloadds-16b151c38f14f9ca7eed6611df44c1c5d1fca42f.tar.gz
ds-16b151c38f14f9ca7eed6611df44c1c5d1fca42f.tar.xz
ds-16b151c38f14f9ca7eed6611df44c1c5d1fca42f.zip
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.
-rw-r--r--ldap/servers/slapd/plugin.c4
1 files 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)
{