From 1a1787d95986e5c3cecc9c9dfecde3e5cb4dbb3b Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Tue, 9 Nov 2021 14:00:23 -0800 Subject: [PATCH] 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. --- epan/tap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epan/tap.c b/epan/tap.c index 9e2c6aec70..08beb48a4e 100644 --- a/epan/tap.c +++ b/epan/tap.c @@ -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;