1948. [bug] If was possible to trigger a REQUIRE failure in

xfrin.c:maybe_free() if named ran out of memory.
                        [RT #15568]
This commit is contained in:
Mark Andrews
2006-01-04 03:08:42 +00:00
parent 8d4981b284
commit edb9d49ef8
2 changed files with 17 additions and 2 deletions
+4
View File
@@ -1,3 +1,7 @@
1948. [bug] If was possible to trigger a REQUIRE failure in
xfrin.c:maybe_free() if named ran out of memory.
[RT #15568]
1944. [cleanup] isc_hash_create() does not need a read/write lock.
[RT #15522]
+13 -2
View File
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: xfrin.c,v 1.124.2.10 2005/11/03 23:41:22 marka Exp $ */
/* $Id: xfrin.c,v 1.124.2.11 2006/01/04 03:08:42 marka Exp $ */
#include <config.h>
@@ -789,7 +789,18 @@ xfrin_create(isc_mem_t *mctx,
return (ISC_R_SUCCESS);
failure:
xfrin_fail(xfr, result, "failed creating transfer context");
if (xfr->timer != NULL)
isc_timer_detach(&xfr->timer);
if (dns_name_dynamic(&xfr->name))
dns_name_free(&xfr->name, xfr->mctx);
if (xfr->tsigkey != NULL)
dns_tsigkey_detach(&xfr->tsigkey);
if (xfr->db != NULL)
dns_db_detach(&xfr->db);
isc_task_detach(&xfr->task);
dns_zone_idetach(&xfr->zone);
isc_mem_put(mctx, xfr, sizeof(*xfr));
return (result);
}