diff options
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2006-05-06 22:00:23 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2006-05-06 22:00:23 +0000
commit659e05529b54b8b37aad65a2257835c17c2a9b68 (patch)
parentdcb63e2a9f376108dd158e5ccd2cb7e6cd7a525e (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. svn path=/trunk/; revision=18101
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);