aboutsummaryrefslogtreecommitdiffstats
path: root/tap-stats_tree.c
diff options
context:
space:
mode:
authorsahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>2006-05-06 22:00:23 +0000
committersahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>2006-05-06 22:00:23 +0000
commit8dc4c54be64b2ba241d11d3a9876aa967097f090 (patch)
tree121b5c55674d22d430ff6a7c4805e64641fc4bbf /tap-stats_tree.c
parent29ab41f5d7ef38637c3f8440a0459c08e77a2166 (diff)
fix for coverity bug 156
it does not seem like it it is possible to trigger this bug since the condition where st is dereferenced and null should be impossible to create. Still handle this impossible situation better if the guarantee that st can not be null here is changed in the future. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18101 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'tap-stats_tree.c')
-rw-r--r--tap-stats_tree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tap-stats_tree.c b/tap-stats_tree.c
index c6e1aeccac..e5784faf1f 100644
--- a/tap-stats_tree.c
+++ b/tap-stats_tree.c
@@ -82,7 +82,8 @@ static void init_stats_tree(const char *optarg,void* userdata _U_) {
if (strncmp (optarg, cfg->pr->init_string, strlen(cfg->pr->init_string)) == 0){
st = stats_tree_new(cfg,NULL,((guint8*)optarg)+strlen(cfg->pr->init_string));
} else {
- st->filter=NULL;
+ report_failure("Wrong stats_tree (%s) found when looking at ->init_string",abbr);
+ return;
}
} else {
report_failure("no such stats_tree (%s) found in stats_tree registry",abbr);