mirror of https://github.com/getdnsapi/getdns.git
Memory leak in tests_dnssec.c
This commit is contained in:
parent
1e14430eaf
commit
c80b24442b
|
@ -98,6 +98,7 @@ main(int argc, char** argv)
|
|||
this_event_base = event_base_new();
|
||||
if (this_event_base == NULL) {
|
||||
fprintf(stderr, "Trying to create the event base failed.");
|
||||
getdns_dict_destroy(this_extensions);
|
||||
getdns_context_destroy(this_context);
|
||||
return (GETDNS_RETURN_GENERIC_ERROR);
|
||||
}
|
||||
|
@ -116,6 +117,7 @@ main(int argc, char** argv)
|
|||
fprintf(stderr, "A bad domain name was used: %s. Exiting.",
|
||||
this_name);
|
||||
event_base_free(this_event_base);
|
||||
getdns_dict_destroy(this_extensions);
|
||||
getdns_context_destroy(this_context);
|
||||
return (GETDNS_RETURN_GENERIC_ERROR);
|
||||
}
|
||||
|
@ -126,6 +128,7 @@ main(int argc, char** argv)
|
|||
}
|
||||
/* Clean up */
|
||||
event_base_free(this_event_base);
|
||||
getdns_dict_destroy(this_extensions);
|
||||
getdns_context_destroy(this_context);
|
||||
/* Assuming we get here, leave gracefully */
|
||||
exit(EXIT_SUCCESS);
|
||||
|
|
Loading…
Reference in New Issue