aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>1999-08-25 22:54:17 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>1999-08-25 22:54:17 +0000
commit11b9a6e949183ec9601175c9d6e76408ccc685be (patch)
tree6ac7eaa738c0cd61409060c9588578d7624067af
parent8904b3b217f81af159e84bb01de15938bcdc7ce1 (diff)
Correctly set global_df->dftree to NULL after a bad parse.
svn path=/trunk/; revision=581
-rw-r--r--dfilter.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/dfilter.c b/dfilter.c
index a81d396fb9..fe3727b330 100644
--- a/dfilter.c
+++ b/dfilter.c
@@ -1,7 +1,7 @@
/* dfilter.c
* Routines for display filters
*
- * $Id: dfilter.c,v 1.14 1999/08/20 21:19:28 gram Exp $
+ * $Id: dfilter.c,v 1.15 1999/08/25 22:54:17 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -247,16 +247,10 @@ clear_byte_array(gpointer data, gpointer user_data)
void
dfilter_error(char *s)
{
-/* fprintf(stderr, "%s\n", s);
- Do not report the error, just let yyparse() return 1 */
-}
-
-void
-dfilter_yyerror(char *fmt, ...)
-{
- /* XXX - is this cool? check for mem leak */
+ /* Setting to NULL here is fine, since global_df is a copy of a pointer.
+ dfilter_clear_filter() will free the memory when called from the
+ next dfilter_compile() */
global_df->dftree = NULL;
- dfilter_error(fmt);
}
/* lookup an abbreviation in our token tree, returing the ID #