]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Cleanup OpenSSL reference on bad option
authorMark Andrews <marka@isc.org>
Mon, 30 Jan 2023 04:26:52 +0000 (15:26 +1100)
committerMark Andrews <marka@isc.org>
Wed, 15 Feb 2023 23:55:42 +0000 (10:55 +1100)
Another exit path that needs to be cleaned up.

bin/dig/dig.c
bin/dig/dighost.c
bin/dig/dighost.h

index 7c5c28545a914b36d862cc1bc50206aba63ce1fa..0d1814cda50407ad1484aa0c4160bf026df97205 100644 (file)
@@ -2195,6 +2195,7 @@ plus_option(char *option, bool is_batchfile, bool *need_clone,
 
 #if !TARGET_OS_IPHONE
 exit_or_usage:
+       cleanup_openssl_refs();
        digexit();
 #endif /* if !TARGET_OS_IPHONE */
 }
index 4bafbf7baec1154c32795428cfdb27f10561f6e2..25c3bdde333ee62086c111b05ece7c24f42eae6d 100644 (file)
@@ -227,9 +227,6 @@ clear_current_lookup(void);
 static bool
 next_origin(dig_lookup_t *oldlookup);
 
-static void
-cleanup_openssl_refs(void);
-
 static int
 count_dots(char *string) {
        char *s;
@@ -4664,7 +4661,7 @@ cancel_all(void) {
        }
 }
 
-static void
+void
 cleanup_openssl_refs(void) {
        if (tsigkey != NULL) {
                debug("freeing TSIG key %p", tsigkey);
index 06beaa91bca6949c8028f7d54cff6c700e69f849..4c12260338a840f96ff6f02ef601ad0a022592d2 100644 (file)
@@ -296,6 +296,9 @@ warn(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
 noreturn void
 digexit(void);
 
+void
+cleanup_openssl_refs(void);
+
 void
 debug(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);