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=75b8cf7a1eff3d24a8567f3209aa023ad4473e95;p=rrdtool.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/program@1915 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/rrd_daemon.c b/src/rrd_daemon.c index 308d3b6..710fa01 100644 --- a/src/rrd_daemon.c +++ b/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 */