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:
Peter Wu 2015-06-23 01:30:13 +02:00
parent 167f9b7aab
commit 42c324d818
1 changed files with 3 additions and 2 deletions

View File

@ -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