]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
Fix 2 unittests
authorVictor Julien <victor@inliniac.net>
Thu, 17 Oct 2013 17:07:46 +0000 (19:07 +0200)
committerVictor Julien <victor@inliniac.net>
Thu, 17 Oct 2013 17:07:46 +0000 (19:07 +0200)
src/detect-http-cookie.c
src/detect-http-method.c

index 4d1a7b545acda8caf20f087e71540b9bcce6c7ed..3563fbf69235a01be8d1251aa69aebf153357a57 100644 (file)
@@ -820,8 +820,8 @@ static int DetectHttpCookieSigTest06(void) {
     int r = AppLayerParse(NULL, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
     if (r != 0) {
         printf("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
-        goto end;
         SCMutexUnlock(&f.m);
+        goto end;
     }
     SCMutexUnlock(&f.m);
 
index 4252ea9a720d3589dd4563d13e5282c780f5ca43..42844618d878fec66b6db560951589ed8d467096 100644 (file)
@@ -651,8 +651,8 @@ static int DetectHttpMethodSigTest03(void)
     int r = AppLayerParse(NULL, &f, ALPROTO_HTTP, STREAM_TOSERVER, httpbuf1, httplen1);
     if (r != 0) {
         SCLogDebug("toserver chunk 1 returned %" PRId32 ", expected 0: ", r);
-        goto end;
         SCMutexUnlock(&f.m);
+        goto end;
     }
     SCMutexUnlock(&f.m);