diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2017-03-01 02:45:20 +0200 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2017-03-01 02:45:20 +0200 |
commit | a4be7b4e24233a66f47a428b0cd256993328352b (patch) | |
tree | c11961e6db7b6cd6c6b223ff1f6db874fe491849 /src/rrdhost.c | |
parent | 5f05c8a05055660ab89ee363e3380e2c0887bb78 (diff) |
fixes identified by coverity
Diffstat (limited to 'src/rrdhost.c')
-rw-r--r-- | src/rrdhost.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rrdhost.c b/src/rrdhost.c index 7002c48234..c5bc6bd778 100644 --- a/src/rrdhost.c +++ b/src/rrdhost.c @@ -409,6 +409,10 @@ void rrdhost_free(RRDHOST *host) { info("Freeing all memory for host '%s'...", host->hostname); rrd_check_wrlock(); // make sure the RRDs are write locked + + // stop a possibly running thread + rrdpush_sender_thread_stop(host); + rrdhost_wrlock(host); // lock this RRDHOST // ------------------------------------------------------------------------ @@ -447,8 +451,6 @@ void rrdhost_free(RRDHOST *host) { // ------------------------------------------------------------------------ // free it - rrdpush_sender_thread_stop(host); - freez(host->os); freez(host->cache_dir); freez(host->varlib_dir); |