From: Tatuya JINMEI 神明達哉 Date: Tue, 21 Apr 2009 00:41:02 +0000 (+0000) Subject: 2586. [bug] Missing cleanup of SIG rdataset in searching a DLZ DB X-Git-Tag: v9.6.1rc1~18^2~8 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=b1b0dca1464a11b8a63623e8567e744dccfbcb41;p=thirdparty%2Fbind9.git 2586. [bug] Missing cleanup of SIG rdataset in searching a DLZ DB or SDB. [RT #19577] --- diff --git a/CHANGES b/CHANGES index 37fecb89971..1ecb87cf498 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +2586. [bug] Missing cleanup of SIG rdataset in searching a DLZ DB + or SDB. [RT #19577] + 2585. [bug] Uninitialized socket name could be referenced via a statistics channel, triggering an assertion failure in XML rendering. [RT #19427] diff --git a/lib/dns/sdb.c b/lib/dns/sdb.c index f141a102f2a..a49357a2889 100644 --- a/lib/dns/sdb.c +++ b/lib/dns/sdb.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: sdb.c,v 1.66 2008/09/24 03:16:58 tbox Exp $ */ +/* $Id: sdb.c,v 1.67 2009/04/21 00:41:02 jinmei Exp $ */ /*! \file */ @@ -880,9 +880,12 @@ find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version, { result = DNS_R_ZONECUT; dns_rdataset_disassociate(rdataset); - if (sigrdataset != NULL) + if (sigrdataset != NULL && + dns_rdataset_isassociated + (sigrdataset)) { dns_rdataset_disassociate (sigrdataset); + } } else result = DNS_R_DELEGATION; break; diff --git a/lib/dns/sdlz.c b/lib/dns/sdlz.c index ec82c3e51c7..b4099ed9964 100644 --- a/lib/dns/sdlz.c +++ b/lib/dns/sdlz.c @@ -50,7 +50,7 @@ * USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: sdlz.c,v 1.18 2008/09/24 02:46:22 marka Exp $ */ +/* $Id: sdlz.c,v 1.19 2009/04/21 00:41:02 jinmei Exp $ */ /*! \file */ @@ -844,9 +844,12 @@ find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version, { result = DNS_R_ZONECUT; dns_rdataset_disassociate(rdataset); - if (sigrdataset != NULL) + if (sigrdataset != NULL && + dns_rdataset_isassociated + (sigrdataset)) { dns_rdataset_disassociate (sigrdataset); + } } else result = DNS_R_DELEGATION; break;