diff options
author | Gerald Combs <gerald@wireshark.org> | 2015-08-03 21:25:00 -0700 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2015-08-04 16:14:22 +0000 |
commit | 632b4023faaa2b77e69d35148a8b6e98f032cc3d (patch) | |
tree | 8314614459c936fb9668228a2da30864882d52ba /epan/stat_tap_ui.c | |
parent | 3413ddf6cb3bf033bc4b675b02770f48f5aa036d (diff) | |
download | wireshark-632b4023faaa2b77e69d35148a8b6e98f032cc3d.tar.gz wireshark-632b4023faaa2b77e69d35148a8b6e98f032cc3d.tar.bz2 wireshark-632b4023faaa2b77e69d35148a8b6e98f032cc3d.zip |
Zero stat table elements instead of freeing them.
Stat table element arrays are allocated once at startup. Reset each
element in free_stat_table() instead of freeing them.
Change-Id: Ia63af93c76a1348bbb809137a521eead58a52dd1
Reviewed-on: https://code.wireshark.org/review/9860
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'epan/stat_tap_ui.c')
-rw-r--r-- | epan/stat_tap_ui.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/epan/stat_tap_ui.c b/epan/stat_tap_ui.c index c038c58592..3f8a15f458 100644 --- a/epan/stat_tap_ui.c +++ b/epan/stat_tap_ui.c @@ -274,11 +274,8 @@ void free_stat_table(new_stat_tap_ui* new_stat, new_stat_tap_gui_free_cb gui_cal if (new_stat->stat_tap_free_table_item_cb) new_stat->stat_tap_free_table_item_cb(stat_table, element, field_index, field_data); } - - g_free(stat_table->elements[element]); + memset(stat_table->elements[i], 0, sizeof(field_data) * stat_table->num_fields); } - - g_free(stat_table->elements); } } |