aboutsummaryrefslogtreecommitdiff
path: root/src/rc/runscript.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-10-06 15:02:32 +0000
committerRoy Marples <roy@marples.name>2008-10-06 15:02:32 +0000
commitcb44b0a46c9b1c72a84cf65e6b4d6ae735c0e413 (patch)
treec203264849ad86d67ddfb86242ef2aa0680a9b8b /src/rc/runscript.c
parent4e4c4a5bf4d5c463b79b5648e614b3b780efdbec (diff)
#ifdef atexit cleanups calling free as the OS should do this for us, but valgrind debuggers need it.
Diffstat (limited to 'src/rc/runscript.c')
-rw-r--r--src/rc/runscript.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/rc/runscript.c b/src/rc/runscript.c
index c04f967a..6dea2b2b 100644
--- a/src/rc/runscript.c
+++ b/src/rc/runscript.c
@@ -327,28 +327,29 @@ static void cleanup(void)
start_services(restart_services);
}
+ rc_plugin_unload();
+
+#ifdef DEBUG_MEMORY
rc_stringlist_free(types_b);
rc_stringlist_free(types_n);
rc_stringlist_free(types_nu);
rc_stringlist_free(types_nua);
rc_stringlist_free(types_m);
rc_stringlist_free(types_mua);
-
- rc_plugin_unload();
rc_deptree_free(deptree);
-
rc_stringlist_free(restart_services);
rc_stringlist_free(need_services);
rc_stringlist_free(use_services);
rc_stringlist_free(services);
rc_stringlist_free(applet_list);
rc_stringlist_free(tmplist);
- free (ibsave);
+ free(ibsave);
free(service);
free(prefix);
free(runlevel);
+#endif
- if (*mtime_test && ! rc_in_plugin)
+ if (*mtime_test && !rc_in_plugin)
unlink(mtime_test);
}