Epan: Reset our tap globals on cleanup.

Reset tap_listener_queue and tap_dissector_list in tap_cleanup() so that
other cleanup routines (e.g. tap dialog destructors) don't try to access
invalid memory. Fixes #17719.
This commit is contained in:
Gerald Combs 2021-11-09 14:00:23 -08:00 committed by Wireshark GitLab Utility
parent 237efe7b00
commit 1a1787d959
1 changed files with 2 additions and 0 deletions

View File

@ -768,6 +768,7 @@ void tap_cleanup(void)
head_lq = head_lq->next;
free_tap_listener(elem_lq);
}
tap_listener_queue = NULL;
while(head_dl){
elem_dl = head_dl;
@ -775,6 +776,7 @@ void tap_cleanup(void)
g_free(elem_dl->name);
g_free((gpointer)elem_dl);
}
tap_dissector_list = NULL;
g_slist_free(tap_plugins);
tap_plugins = NULL;