From 9c1eb2279d715188bf631d98d103f6f81a3c76fb Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 1 Jul 2003 03:51:30 +0000 Subject: [PATCH] 1477. [bug] memory leak using stub zones and TSIG. --- CHANGES | 2 ++ lib/dns/zone.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 6f68dd7682..39634ef383 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +1477. [bug] memory leak using stub zones and TSIG. + 1476. [placeholder] 1475. [port] Probe for old sprintf(). diff --git a/lib/dns/zone.c b/lib/dns/zone.c index ab09bb8d44..0f09e9fd80 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: zone.c,v 1.391 2003/06/06 06:09:39 marka Exp $ */ +/* $Id: zone.c,v 1.392 2003/07/01 03:51:30 marka Exp $ */ #include @@ -4108,6 +4108,8 @@ ns_query(dns_zone_t *zone, dns_rdataset_t *soardataset, dns_stub_t *stub) { if (message != NULL) dns_message_destroy(&message); unlock: + if (key != NULL) + dns_tsigkey_detach(&key); UNLOCK_ZONE(zone); return; }