aboutsummaryrefslogtreecommitdiffstats
path: root/epan/stats_tree.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2015-08-20 08:56:04 -0700
committerGerald Combs <gerald@wireshark.org>2015-08-20 18:07:02 +0000
commit36a74cb13a7ee8e4e0972243d1a6a9ae641adb03 (patch)
tree8088c5944f295c6e17f1779deae4b397af8650d3 /epan/stats_tree.c
parent37a737f6d17da822cf9e2b06adc4ae7a4a57c01f (diff)
Tap parameter and stats dialog fixups.
If we run into an error when trying to register a tap listener, return instead of tapping packets. This should fix some (but likely not all) double frees found by Stig. For now close each statistics dialog if we find an error. Note that we might want to keep them open instead. Add checks and cleanups to some of the stats table free routines. Call fillTree once in TapParameterDialog's constructor instead of each time it's shown. Make fillTree a slot which lets us use a delay timer so that the dialog is visible when we retap packets. Change-Id: Id49f2f2a99bc8e5b1d32990024986b3c8b1abe24 Reviewed-on: https://code.wireshark.org/review/10153 Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'epan/stats_tree.c')
-rw-r--r--epan/stats_tree.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/epan/stats_tree.c b/epan/stats_tree.c
index aaad74e344..682dfbeb90 100644
--- a/epan/stats_tree.c
+++ b/epan/stats_tree.c
@@ -137,6 +137,8 @@ stats_tree_free(stats_tree *st)
stat_node *child;
stat_node *next;
+ if (!st) return;
+
g_free(st->filter);
g_hash_table_destroy(st->names);
g_ptr_array_free(st->parents,TRUE);