From 3813dcdc7d9baa34fecde42be3e0748565c78a12 Mon Sep 17 00:00:00 2001 From: chris mikkelson Date: Thu, 11 Mar 2010 13:39:13 -0600 Subject: [PATCH] (re)initialize sre->result in re_stream_start(). --- re_stream.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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; } -- 2.50.1