From: Victor Julien Date: Mon, 9 Dec 2013 12:29:02 +0000 (+0100) Subject: flowvar: initialize new memory to prevent issues on error handling X-Git-Tag: suricata-2.0beta2~57 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b4e6bbe4bcd3fda31532a2bba138af81bb53760b;p=thirdparty%2Fsuricata.git flowvar: initialize new memory to prevent issues on error handling --- diff --git a/src/detect-flowvar.c b/src/detect-flowvar.c index 1f5bdc1aff..aa630b61a1 100644 --- a/src/detect-flowvar.c +++ b/src/detect-flowvar.c @@ -173,6 +173,7 @@ static int DetectFlowvarSetup (DetectEngineCtx *de_ctx, Signature *s, char *raws fd = SCMalloc(sizeof(DetectFlowvarData)); if (unlikely(fd == NULL)) goto error; + memset(fd, 0x00, sizeof(*fd)); fd->content = SCMalloc(contentlen); if (unlikely(fd->content == NULL))