From 8e163c86e86273e157cea8345ad0ddda157c62ea Mon Sep 17 00:00:00 2001 From: oetiker Date: Sat, 8 Aug 2009 09:29:50 +0000 Subject: [PATCH] Increment the DataSetsWritten counter before freeing the RRD values. --kevin git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1882 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/src/rrd_daemon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/program/src/rrd_daemon.c b/program/src/rrd_daemon.c index 2a35ec2a..0e95e903 100644 --- a/program/src/rrd_daemon.c +++ b/program/src/rrd_daemon.c @@ -924,9 +924,6 @@ static void *queue_thread_main (void *args __attribute__((unused))) /* {{{ */ pthread_cond_broadcast(&ci->flushed); pthread_mutex_unlock(&cache_lock); - rrd_free_ptrs((void ***) &values, &values_num); - free(file); - if (status == 0) { pthread_mutex_lock (&stats_lock); @@ -935,6 +932,9 @@ static void *queue_thread_main (void *args __attribute__((unused))) /* {{{ */ pthread_mutex_unlock (&stats_lock); } + rrd_free_ptrs((void ***) &values, &values_num); + free(file); + pthread_mutex_lock (&cache_lock); } pthread_mutex_unlock (&cache_lock); -- 2.30.2