]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Move matching isc_mem_destroy() outside of ifdef alessio/regression/2ebcafd8c2
authorOndřej Surý <ondrej@isc.org>
Mon, 5 Aug 2024 13:55:53 +0000 (15:55 +0200)
committerOndřej Surý <ondrej@isc.org>
Mon, 5 Aug 2024 14:35:22 +0000 (16:35 +0200)
The isc_mem_create() in printversion() was created outside of an #ifdef
HAVE_GEOIP, but destroyed inside the #ifdef; move it to the outside of
the #ifdef where it belongs.

This is really a nit as we immediately exit() after printing the
versions, but I found it and it would bug me for the rest of my life.

bin/named/main.c

index 2bb5c1292dddc9f5609ebfdb93140a069fef4215..735b361ac592e80f789c5458637d2f71d769f4ba 100644 (file)
@@ -674,8 +674,8 @@ printversion(bool verbose) {
        }
        cfg_obj_destroy(parser, &config);
        cfg_parser_destroy(&parser);
-       isc_mem_detach(&mctx);
 #endif /* HAVE_GEOIP2 */
+       isc_mem_detach(&mctx);
 }
 
 static void