summaryrefslogtreecommitdiffstats
path: root/contrib/bind9/lib/dns/iptable.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bind9/lib/dns/iptable.c')
-rw-r--r--contrib/bind9/lib/dns/iptable.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/bind9/lib/dns/iptable.c b/contrib/bind9/lib/dns/iptable.c
index e960d5c..7019505 100644
--- a/contrib/bind9/lib/dns/iptable.c
+++ b/contrib/bind9/lib/dns/iptable.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007-2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2007-2009, 2013 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -36,7 +36,8 @@ dns_iptable_create(isc_mem_t *mctx, dns_iptable_t **target) {
tab = isc_mem_get(mctx, sizeof(*tab));
if (tab == NULL)
return (ISC_R_NOMEMORY);
- tab->mctx = mctx;
+ tab->mctx = NULL;
+ isc_mem_attach(mctx, &tab->mctx);
isc_refcount_init(&tab->refcount, 1);
tab->radix = NULL;
tab->magic = DNS_IPTABLE_MAGIC;
@@ -184,5 +185,5 @@ destroy_iptable(dns_iptable_t *dtab) {
isc_refcount_destroy(&dtab->refcount);
dtab->magic = 0;
- isc_mem_put(dtab->mctx, dtab, sizeof(*dtab));
+ isc_mem_putanddetach(&dtab->mctx, dtab, sizeof(*dtab));
}
OpenPOWER on IntegriCloud