From: oetiker Date: Mon, 28 Sep 2009 16:16:09 +0000 (+0000) Subject: free config_pid_file after using it for the last time ... Else, the daemon might... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d276a4138fc1e42bec970b617919ae382bc6f107;p=rrdtool-all.git free config_pid_file after using it for the last time ... Else, the daemon might either segfault or leave the PID file around. -- Sebastian Harl git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1915 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/program/src/rrd_daemon.c b/program/src/rrd_daemon.c index 308d3b6b..710fa017 100644 --- a/program/src/rrd_daemon.c +++ b/program/src/rrd_daemon.c @@ -2677,7 +2677,6 @@ static int cleanup (void) /* {{{ */ free(queue_threads); free(config_base_dir); - free(config_pid_file); pthread_mutex_lock(&cache_lock); g_tree_destroy(cache_tree); @@ -2689,6 +2688,7 @@ static int cleanup (void) /* {{{ */ closelog (); remove_pidfile (); + free(config_pid_file); return (0); } /* }}} int cleanup */