X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=pattern.c;h=d7b274f52048e6f34b5f02c005780c724a032958;hp=81bebddb6210ce49e4ecb1337178184c5905fc83;hb=4f61fa445bff564984acf29fc91858af0ed2725e;hpb=b85f52d2ec4d820ab5c4b577857548bec294bb27;ds=sidebyside diff --git a/pattern.c b/pattern.c index 81bebdd..d7b274f 100644 --- a/pattern.c +++ b/pattern.c @@ -684,7 +684,7 @@ void mutt_pattern_free (pattern_t ** pat) regfree (tmp->rx); mem_free (&tmp->rx); } - mem_free (tmp->str); + mem_free (&tmp->str); if (tmp->child) mutt_pattern_free (&tmp->child); mem_free (&tmp); @@ -698,7 +698,6 @@ pattern_t *mutt_pattern_comp ( /* const */ char *s, int flags, BUFFER * err) pattern_t *last = NULL; int not = 0; int alladdr = 0; - int stringmatch = 0; int or = 0; int implicit = 1; /* used to detect logical AND operator */ struct pattern_flags *entry; @@ -744,10 +743,8 @@ pattern_t *mutt_pattern_comp ( /* const */ char *s, int flags, BUFFER * err) implicit = 0; not = 0; alladdr = 0; - stringmatch = 0; break; case '=': - stringmatch = 1; /* fallthrough */ case '~': if (implicit && or) { @@ -763,10 +760,9 @@ pattern_t *mutt_pattern_comp ( /* const */ char *s, int flags, BUFFER * err) tmp = new_pattern (); tmp->not = not; tmp->alladdr = alladdr; - tmp->stringmatch = stringmatch; + tmp->stringmatch = (*ps.dptr == '=') ? 1 : 0; not = 0; alladdr = 0; - stringmatch = 0; if (last) last->next = tmp;