stat_tap: don't use-after-free (found by clang).

Change-Id: Ie7304ad70c8cf3ac62abdf07aaa94d12c409f1b0
Reviewed-on: https://code.wireshark.org/review/25339
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
Dario Lombardo 2018-01-16 14:11:58 +01:00 committed by Michael Mann
parent f3b71f597c
commit 34381ed20c
1 changed files with 1 additions and 1 deletions

View File

@ -139,9 +139,9 @@ start_requested_stats(void)
while(stats_requested){
sr=(stat_requested *)stats_requested->data;
(*sr->sca->func)(sr->arg,sr->sca->userdata);
stats_requested=g_slist_remove(stats_requested, sr);
g_free(sr->arg);
g_free(sr);
stats_requested=g_slist_remove(stats_requested, sr);
}
}