packet: fix memleak of "short_name" for heuristics dissectors
Change-Id: I3b954e3623473899b6039f0ff572eb56defe14cc Fixes: v2.3.0rc0-1841-ga8b68205a4 ("packet: duplicate short_name to fix UAF in wslua") Reviewed-on: https://code.wireshark.org/review/19571 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
parent
6a6d7ea34f
commit
4dc983d648
|
@ -148,7 +148,9 @@ static GHashTable* heuristic_short_names = NULL;
|
|||
static void
|
||||
destroy_heuristic_dissector_entry(gpointer data, gpointer user_data _U_)
|
||||
{
|
||||
g_free(((heur_dtbl_entry_t*)data)->list_name);
|
||||
heur_dtbl_entry_t *hdtbl_entry = (heur_dtbl_entry_t *)data;
|
||||
g_free(hdtbl_entry->list_name);
|
||||
g_free(hdtbl_entry->short_name);
|
||||
g_slice_free(heur_dtbl_entry_t, data);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue