summaryrefslogtreecommitdiffstats
path: root/ldap/servers/slapd/plugin.c
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2005-03-24 17:12:06 +0000
committerRich Megginson <rmeggins@redhat.com>2005-03-24 17:12:06 +0000
commitb6bff935c117b5042cd2a9809218607c01bea965 (patch)
treeff24a822b63d879254a679bad694b09d2454bc67 /ldap/servers/slapd/plugin.c
parentd80d9cceedbe18c97d240fca0ee6c20d01253423 (diff)
downloadds-b6bff935c117b5042cd2a9809218607c01bea965.tar.gz
ds-b6bff935c117b5042cd2a9809218607c01bea965.tar.xz
ds-b6bff935c117b5042cd2a9809218607c01bea965.zip
Bug(s) fixed: 152030
Bug Description: Various valgrind reported problems. Mostly not serious, but a few which could cause bad leaks in certain situations. Reviewed by: Rob and David (Thanks!) Fix Description: Mostly added frees where needed, or moved things around to make sure the proper free was called. I also fixed the formatting/spacing. Platforms tested: RHEL3 Flag Day: no Doc impact: No. QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none
Diffstat (limited to 'ldap/servers/slapd/plugin.c')
-rw-r--r--ldap/servers/slapd/plugin.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/ldap/servers/slapd/plugin.c b/ldap/servers/slapd/plugin.c
index 42ded667..bd7c92ba 100644
--- a/ldap/servers/slapd/plugin.c
+++ b/ldap/servers/slapd/plugin.c
@@ -883,6 +883,11 @@ plugin_dependency_startall(int argc, char** argv, char *errmsg, int operation)
* create an operation and include that in the pblock as well,
* because these two items are stored in the operation parameters.
*/
+ /* WARNING: memory leak here - op is only freed by a pblock_done,
+ and this only happens below if the plugin is enabled - a short
+ circuit goto bail may also cause a leak - however, since this
+ only happens a few times at startup, this is not a very serious
+ leak - just after the call to plugin_call_one */
Operation *op = internal_operation_new(SLAPI_OPERATION_ADD, 0);
slapi_pblock_set(&(config[plugin_index].pb), SLAPI_OPERATION, op);
slapi_pblock_set(&(config[plugin_index].pb), SLAPI_TARGET_DN,
@@ -1164,16 +1169,16 @@ bail:
if(config)
{
- /*
index = 0;
while(index < total_plugins)
{
+/*
if(config[index].depends_named_list)
{
slapi_ch_free((void**)&(config[index].depends_named_list));
}
-
+*/
if(config[index].depends_type_list)
{
i = 0;
@@ -1187,13 +1192,12 @@ bail:
slapi_ch_free((void**)&(config[index].depends_type_list));
}
-
+/*
slapi_ch_free((void**)&(config[index].name));
slapi_ch_free((void**)&(config[index].type));
-
+*/
index++;
}
- */
slapi_ch_free((void**)&config);
}