]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Improve the atomics usage in isc_counter API
authorOndřej Surý <ondrej@sury.org>
Thu, 28 Nov 2019 09:36:26 +0000 (10:36 +0100)
committerOndřej Surý <ondrej@sury.org>
Thu, 28 Nov 2019 10:21:52 +0000 (11:21 +0100)
lib/isc/counter.c

index 52abdae92241071021ad9bb836c153a23373d286..3270e3370a891f74c895ca57ceb9f12907359186 100644 (file)
@@ -90,6 +90,7 @@ isc_counter_attach(isc_counter_t *source, isc_counter_t **targetp) {
 
 static void
 destroy(isc_counter_t *counter) {
+       isc_refcount_destroy(&counter->references);
        counter->magic = 0;
        isc_mem_putanddetach(&counter->mctx, counter, sizeof(*counter));
 }