From 85db2b5fb360ccd2aeec1e6e22336b3d654bb39a Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 11 Sep 2007 02:18:38 +0000 Subject: [PATCH] 2232. [bug] dns_adb_findaddrinfo() could fail and return ISC_R_SUCCESS. [RT #17137] --- CHANGES | 3 +++ lib/dns/adb.c | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index ba3dfa3a82..c1dd2d8796 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +2232. [bug] dns_adb_findaddrinfo() could fail and return + ISC_R_SUCCESS. [RT #17137] + 2231. [bug] Building dlzbdb (contrib/dlz/bin/dlzbdb) was broken. [RT #17088] diff --git a/lib/dns/adb.c b/lib/dns/adb.c index 79b6a19ba2..fb584cdc96 100644 --- a/lib/dns/adb.c +++ b/lib/dns/adb.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: adb.c,v 1.231 2007/06/18 23:47:40 tbox Exp $ */ +/* $Id: adb.c,v 1.232 2007/09/11 02:18:38 marka Exp $ */ /*! \file * @@ -3471,7 +3471,9 @@ dns_adb_findaddrinfo(dns_adb_t *adb, isc_sockaddr_t *sa, port = isc_sockaddr_getport(sa); addr = new_adbaddrinfo(adb, entry, port); - if (addr != NULL) { + if (addr == NULL) { + result = ISC_R_NOMEMORY; + } else { inc_entry_refcnt(adb, entry, ISC_FALSE); *addrp = addr; }