aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2016-07-05 16:19:33 +0200
committerMichael Mann <mmann78@netscape.net>2016-07-05 19:52:45 +0000
commitaea00239802d33f2fe175c5dff185e0f4b7b1b21 (patch)
treecbfece282a8a442ce95619223036641320a0a036
parentd7c072de7b630e8f1a92c4ad27b059569df1b446 (diff)
tap: check return value (CID 1355643).
Change-Id: I03b141c7aeaa1bc06dc126c5cc8f0d001a57c116 Reviewed-on: https://code.wireshark.org/review/16302 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r--epan/tap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/epan/tap.c b/epan/tap.c
index 1348e375dd..eb973410ab 100644
--- a/epan/tap.c
+++ b/epan/tap.c
@@ -634,8 +634,10 @@ tap_listeners_dfilter_recompile(void)
if(tl->fstring){
if(!dfilter_compile(tl->fstring, &code, &err_msg)){
g_free(err_msg);
+ err_msg = NULL;
/* Not valid, make a dfilter matching no packets */
- dfilter_compile("frame.number == 0", &code, &err_msg);
+ if (!dfilter_compile("frame.number == 0", &code, &err_msg))
+ g_free(err_msg);
}
}
tl->code=code;