From: Eric Leblond Date: Thu, 4 Jul 2013 08:11:47 +0000 (+0200) Subject: Fix compilation warning X-Git-Tag: suricata-2.0beta1~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=281d2f27f883a443107a8de238da790ffc534e5a;p=thirdparty%2Fsuricata.git Fix compilation warning A goto could lead to the use de_ctx without declaring it. --- diff --git a/src/detect-csum.c b/src/detect-csum.c index 8f412c72b0..776cd656f8 100644 --- a/src/detect-csum.c +++ b/src/detect-csum.c @@ -1483,6 +1483,7 @@ int DetectCsumICMPV6ValidArgsTestParse03(void) { int DetectCsumICMPV6Test01(void) { int result = 0; + DetectEngineCtx *de_ctx = NULL; Packet *p = PacketGetFromAlloc(); if (p == NULL) { @@ -1520,7 +1521,7 @@ int DetectCsumICMPV6Test01(void) StreamTcpInitConfig(TRUE); FlowInitConfig(FLOW_QUIET); - DetectEngineCtx *de_ctx = DetectEngineCtxInit(); + de_ctx = DetectEngineCtxInit(); if (de_ctx == NULL) { printf("DetectEngineCtxInit failure\n"); goto end;