From: Ondřej Surý Date: Fri, 27 Sep 2019 06:48:06 +0000 (+0200) Subject: bin/dig/dighost.c: Fix REQUIRE(!= NULL) condition after the variable has been derefer... X-Git-Tag: v9.15.6~72^2~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9366ca769f2f6d6ede4e12fe919179f4a409a9e6;p=thirdparty%2Fbind9.git bin/dig/dighost.c: Fix REQUIRE(!= NULL) condition after the variable has been dereferenced --- diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index 5e24af65e53..e2018a7af7d 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -2045,6 +2045,9 @@ setup_lookup(dig_lookup_t *lookup) { char cookiebuf[256]; char *origin = NULL; char *textname = NULL; + + REQUIRE(lookup != NULL); + #ifdef HAVE_LIBIDN2 char idn_origin[MXNAME], idn_textname[MXNAME]; @@ -2053,7 +2056,6 @@ setup_lookup(dig_lookup_t *lookup) { check_result(result, "dns_name_settotextfilter"); #endif /* HAVE_LIBIDN2 */ - REQUIRE(lookup != NULL); INSIST(!free_now); debug("setup_lookup(%p)", lookup);