Cleanup OpenSSL reference on bad option
Another exit path that needs to be cleaned up.
This commit is contained in:
@@ -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 */
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user