forked from osmocom/wireshark
packet: fix memleak
It turns out that a heur_dissector_list_t structure was not released, only the GSList inside it. Ensure that this list gets released as well. Change-Id: If79deb5d011d306477d082368744addcee794ae1 Reviewed-on: https://code.wireshark.org/review/9040 Reviewed-by: Peter Wu <peter@lekensteyn.nl>
This commit is contained in:
parent
167f9b7aab
commit
42c324d818
|
@ -119,11 +119,12 @@ destroy_heuristic_dissector_entry(gpointer data, gpointer user_data _U_)
|
|||
static void
|
||||
destroy_heuristic_dissector_list(void *data)
|
||||
{
|
||||
GSList **list = &((heur_dissector_list_t)data)->dissectors;
|
||||
heur_dissector_list_t dissector_list = (heur_dissector_list_t)data;
|
||||
GSList **list = &(dissector_list->dissectors);
|
||||
|
||||
g_slist_foreach(*list, destroy_heuristic_dissector_entry, NULL);
|
||||
g_slist_free(*list);
|
||||
*list = NULL;
|
||||
g_slice_free(struct heur_dissector_list, dissector_list);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue