]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
Fix compilation warning
authorEric Leblond <eric@regit.org>
Thu, 4 Jul 2013 08:11:47 +0000 (10:11 +0200)
committerVictor Julien <victor@inliniac.net>
Wed, 17 Jul 2013 13:03:50 +0000 (15:03 +0200)
A goto could lead to the use de_ctx without declaring it.

src/detect-csum.c

index 8f412c72b052d7cbd892b44acd950c24b3576218..776cd656f800c6ba59badd8e23b3e0f4ab4a051c 100644 (file)
@@ -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;