From cb44b0a46c9b1c72a84cf65e6b4d6ae735c0e413 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Mon, 6 Oct 2008 15:02:32 +0000 Subject: #ifdef atexit cleanups calling free as the OS should do this for us, but valgrind debuggers need it. --- src/rc/runscript.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/rc/runscript.c') diff --git a/src/rc/runscript.c b/src/rc/runscript.c index c04f967..6dea2b2 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); } -- cgit v1.2.3