aboutsummaryrefslogtreecommitdiffstats
path: root/epan
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
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')
-rw-r--r--epan/rtd_table.c2
-rw-r--r--epan/stats_tree.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/epan/rtd_table.c b/epan/rtd_table.c
index 1fe33d2b3a..40fe46b0f8 100644
--- a/epan/rtd_table.c
+++ b/epan/rtd_table.c
@@ -109,6 +109,8 @@ void free_rtd_table(rtd_stat_table* table, rtd_gui_free_cb gui_callback, void *c
g_free(table->time_stats[i].rtd);
}
g_free(table->time_stats);
+ table->time_stats = NULL;
+ table->num_rtds = 0;
/* Give GUI the first crack at it before we clean up */
if (gui_callback)
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);