mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 15:05:23 +00:00
lock mctx for DELETE_TRACE call in isc__mempool_put()
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: mem.c,v 1.111 2002/02/20 03:35:25 marka Exp $ */
|
/* $Id: mem.c,v 1.112 2002/03/19 02:40:16 marka Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@@ -1606,7 +1606,11 @@ isc__mempool_put(isc_mempool_t *mpctx, void *mem FLARG) {
|
|||||||
INSIST(mpctx->allocated > 0);
|
INSIST(mpctx->allocated > 0);
|
||||||
mpctx->allocated--;
|
mpctx->allocated--;
|
||||||
|
|
||||||
|
#if ISC_MEM_TRACKLINES
|
||||||
|
LOCK(&mctx->lock);
|
||||||
DELETE_TRACE(mctx, mem, mpctx->size, file, line);
|
DELETE_TRACE(mctx, mem, mpctx->size, file, line);
|
||||||
|
UNLOCK(&mctx->lock);
|
||||||
|
#endif /* ISC_MEM_TRACKLINES */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If our free list is full, return this to the mctx directly.
|
* If our free list is full, return this to the mctx directly.
|
||||||
|
Reference in New Issue
Block a user