From: chris mikkelson Date: Thu, 11 Mar 2010 19:39:13 +0000 (-0600) Subject: (re)initialize sre->result in re_stream_start(). X-Git-Url: https://git.mikk.net/?a=commitdiff_plain;h=3813dcdc7d9baa34fecde42be3e0748565c78a12;p=liburl (re)initialize sre->result in re_stream_start(). --- diff --git a/re_stream.c b/re_stream.c index 9a76de9..4c54f1d 100644 --- a/re_stream.c +++ b/re_stream.c @@ -23,12 +23,10 @@ re_stream_start(struct stream_re *sre, pcre *re, int flags) sre->rlen = 0; sre->flags = flags & ~(PCRE_ANCHORED|PCRE_NOTBOL|PCRE_NOTEOL); sre->state = 0; - if (!sre->result) { - sre->result = malloc(RALLOC_INIT); - if (!sre->result) return NULL; - sre->ralloc = RALLOC_INIT; - sre->result[0] = 0; - } + sre->result = malloc(RALLOC_INIT); + if (!sre->result) return NULL; + sre->ralloc = RALLOC_INIT; + sre->result[0] = 0; return sre; }