forked from osmocom/wireshark
Don't crash in manually_resolve_cleanup() if there's nothing to clean up.
We might not yet have allocated the manually-resolved address lists; only free the if we have. Change-Id: Iff9864e397a04cdcb613268603c073ecd1fa77fb Reviewed-on: https://code.wireshark.org/review/26236 Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
07cb624e48
commit
302fa68817
|
@ -2810,10 +2810,14 @@ host_name_lookup_cleanup(void)
|
|||
void
|
||||
manually_resolve_cleanup(void)
|
||||
{
|
||||
wmem_destroy_list(manually_resolved_ipv4_list);
|
||||
manually_resolved_ipv4_list = NULL;
|
||||
wmem_destroy_list(manually_resolved_ipv6_list);
|
||||
manually_resolved_ipv6_list = NULL;
|
||||
if (manually_resolved_ipv4_list) {
|
||||
wmem_destroy_list(manually_resolved_ipv4_list);
|
||||
manually_resolved_ipv4_list = NULL;
|
||||
}
|
||||
if (manually_resolved_ipv6_list) {
|
||||
wmem_destroy_list(manually_resolved_ipv6_list);
|
||||
manually_resolved_ipv6_list = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
gchar *
|
||||
|
|
Loading…
Reference in New Issue