2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 13:38:26 +00:00

redundant code

This commit is contained in:
Brian Wellington 2000-12-06 23:39:04 +00:00
parent d9135464f2
commit 1afae09da4

View File

@ -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.71 2000/12/06 20:34:34 tale Exp $ */ /* $Id: mem.c,v 1.72 2000/12/06 23:39:04 bwelling Exp $ */
#include <config.h> #include <config.h>
@ -846,7 +846,6 @@ isc__mem_putanddetach(isc_mem_t **ctxp, void *ptr, size_t size FLARG) {
void void
isc_mem_destroy(isc_mem_t **ctxp) { isc_mem_destroy(isc_mem_t **ctxp) {
isc_mem_t *ctx; isc_mem_t *ctx;
isc_boolean_t want_destroy = ISC_FALSE;
/* /*
* This routine provides legacy support for callers who use mctxs * This routine provides legacy support for callers who use mctxs
@ -860,11 +859,8 @@ isc_mem_destroy(isc_mem_t **ctxp) {
LOCK(&ctx->lock); LOCK(&ctx->lock);
REQUIRE(ctx->references == 1); REQUIRE(ctx->references == 1);
ctx->references--; ctx->references--;
if (ctx->references == 0)
want_destroy = ISC_TRUE;
UNLOCK(&ctx->lock); UNLOCK(&ctx->lock);
if (want_destroy)
destroy(ctx); destroy(ctx);
*ctxp = NULL; *ctxp = NULL;