fix a segfault in the parser
authorColin Leroy <colin@colino.net>
Wed, 13 Nov 2002 12:55:51 +0000 (12:55 +0000)
committerColin Leroy <colin@colino.net>
Wed, 13 Nov 2002 12:55:51 +0000 (12:55 +0000)
ChangeLog.claws
configure.in
src/matcher.c
src/matcher_parser_parse.y

index 2c4868e..044ac83 100644 (file)
@@ -1,3 +1,10 @@
+2002-11-13 [colin]     0.8.5claws139
+
+       * src/matcher_parser_parse.y
+               Fix a segfault in the parser (happening when
+               a good expression had been tested and a bad 
+               one arrives)
+
 2002-11-13 [paul]      0.8.5claws138
 
        * sync with 0.8.5cvs24
index 933ce47..d24a0b5 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=5
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws138
+EXTRA_VERSION=claws139
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 2b59595..fe4496f 100644 (file)
@@ -956,7 +956,7 @@ gchar * matcherlist_to_string(MatcherList * matchers)
        gchar ** vstr;
        GSList * l;
        gchar ** cur_str;
-       gchar * result;
+       gchar * result = NULL;
 
        count = g_slist_length(matchers->matchers);
        vstr = g_new(gchar *, count + 1);
index 1ca569e..15a6459 100644 (file)
@@ -128,13 +128,15 @@ void matcher_parsererror(char * str)
 
        if (matchers_list) {
                for(l = matchers_list ; l != NULL ;
-                   l = g_slist_next(l))
+                   l = g_slist_next(l)) {
                        matcherprop_free((MatcherProp *)
                                         l->data);
+                       l->data = NULL;
+               }
                g_slist_free(matchers_list);
                matchers_list = NULL;
        }
-
+       cond = NULL;
        g_warning(_("scoring / filtering parsing: %i: %s\n"),
                  matcher_parserlineno, str);
        error = 1;