]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
check result
authorMark Andrews <marka@isc.org>
Wed, 2 Dec 2020 23:33:23 +0000 (10:33 +1100)
committerMark Andrews <marka@isc.org>
Thu, 10 Dec 2020 02:34:36 +0000 (02:34 +0000)
lib/dns/geoip2.c

index 9ba7f1a3b19ab43ba42ccbd4c15c2e0d5ff84beb..0678fc33e17d45b30a69d4baaf8c2a76150deb1b 100644 (file)
@@ -165,8 +165,10 @@ state_key_init(void) {
 
        if (state_mctx == NULL) {
                result = isc_mem_create(0, 0, &state_mctx);
-               isc_mem_setname(state_mctx, "geoip_state", NULL);
-               isc_mem_setdestroycheck(state_mctx, false);
+               if (result == ISC_R_SUCCESS) {
+                       isc_mem_setname(state_mctx, "geoip_state", NULL);
+                       isc_mem_setdestroycheck(state_mctx, false);
+               }
        }
 
        return (result);