From: Mark Andrews Date: Thu, 30 Jan 2020 07:55:36 +0000 (+1100) Subject: skip if first is NULL X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe745d238d8c218dc973f64716863387e341af47;p=thirdparty%2Fbind9.git skip if first is NULL --- diff --git a/lib/dns/zoneverify.c b/lib/dns/zoneverify.c index c19367b0a0e..7a240ff74a6 100644 --- a/lib/dns/zoneverify.c +++ b/lib/dns/zoneverify.c @@ -1215,15 +1215,15 @@ verify_nsec3_chains(const vctx_t *vctx, isc_mem_t *mctx) { result = ISC_R_FAILURE; } if (first == NULL || newchain(first, e)) { - if (prev != NULL) { - if (!checknext(vctx, prev, first)) { - result = ISC_R_FAILURE; - } - if (prev != first) { - free_element(mctx, prev); - } - } if (first != NULL) { + if (prev != NULL) { + if (!checknext(vctx, prev, first)) { + result = ISC_R_FAILURE; + } + if (prev != first) { + free_element(mctx, prev); + } + } free_element(mctx, first); } prev = first = e;