diff options
author | Roland Knall <roland.knall@br-automation.com> | 2015-12-23 10:10:55 +0100 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2015-12-23 11:35:25 +0000 |
commit | 35ee09e0f0dfccc0db23a7b34548943ef54a6a74 (patch) | |
tree | 0711ae6740e701ab961b68bae53dc681cd96386e /tshark.c | |
parent | 0285fb9e215ae0f3859f314c3eb03e69ad2fd3ff (diff) |
capture_info: Fix initialization of packet counter
g_hash_table_destroy will crash, if it is called on
non-initialized memory. For some reason, this does not happen
with other glib lists (e.g. GList seems to guard cleanly).
This change initializes at the earliest possible time the
packet counter hash with NULL
Change-Id: Ice66652fc9639d10b49d006ecbe80efe3f41e2ff
Reviewed-on: https://code.wireshark.org/review/12841
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'tshark.c')
-rw-r--r-- | tshark.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2564,6 +2564,9 @@ capture(void) fflush(stderr); g_string_free(str, TRUE); + /* initialize the counts hash with null */ + global_info_data.counts.counts_hash = NULL; + ret = sync_pipe_start(&global_capture_opts, &global_capture_session, &global_info_data, NULL); if (!ret) |