From: Alan T. DeKok Date: Thu, 19 Oct 2017 19:22:54 +0000 (-0400) Subject: delete lock after using it. CID #141442 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31cef4281e2fd12cd4ae340c8dc426c325964135;p=thirdparty%2Ffreeradius-server.git delete lock after using it. CID #141442 --- diff --git a/src/lib/util/fring.c b/src/lib/util/fring.c index 1cb2313c76d..ee813605f22 100644 --- a/src/lib/util/fring.c +++ b/src/lib/util/fring.c @@ -55,13 +55,13 @@ static int _fring_free(fr_fring_t *fring) { void *next; - if (fring->lock) pthread_mutex_destroy(&fring->mutex); - /* * Free any data left in the buffer */ while ((next = fr_fring_next(fring))) talloc_free(next); + if (fring->lock) pthread_mutex_destroy(&fring->mutex); + return 0; }