From: Mark Andrews Date: Mon, 17 Mar 2014 12:25:21 +0000 (+1100) Subject: 3789. [bug] Null pointer dereference on rbt creation failure. X-Git-Tag: v9.10.0rc1~48 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=adbb48b4a0c6216f96d8b40712f23da893444f1c;p=thirdparty%2Fbind9.git 3789. [bug] Null pointer dereference on rbt creation failure. --- diff --git a/CHANGES b/CHANGES index 6d2599bd663..e9109cb936d 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +3789. [bug] Null pointer dereference on rbt creation failure. + 3788. [bug] dns_peer_getrequestsit was returning request_nsid by mistake. diff --git a/lib/dns/rbt.c b/lib/dns/rbt.c index e1421f826d1..4e3b51fd164 100644 --- a/lib/dns/rbt.c +++ b/lib/dns/rbt.c @@ -865,7 +865,7 @@ dns_rbt_deserialize_tree(void *base_address, size_t filesize, result = ISC_R_INVALIDFILE; cleanup: - if (result != ISC_R_SUCCESS) { + if (result != ISC_R_SUCCESS && rbt != NULL) { rbt->root = NULL; rbt->nodecount = 0; dns_rbt_destroy(&rbt);