diff --git a/src/detect-http-cookie.c b/src/detect-http-cookie.c index e98a5608be..df5bf4c399 100644 --- a/src/detect-http-cookie.c +++ b/src/detect-http-cookie.c @@ -385,7 +385,7 @@ end: /** * \test Checks if a http_cookie is registered in a Signature, when fast_pattern - * is also specified in the signature + * is also specified in the signature (now it should) */ int DetectHttpCookieTest04(void) { @@ -399,12 +399,12 @@ int DetectHttpCookieTest04(void) de_ctx->sig_list = SigInit(de_ctx, "alert icmp any any -> any any " "(msg:\"Testing http_cookie\"; content:\"one\"; " "fast_pattern; http_cookie; sid:1;)"); - if (de_ctx->sig_list == NULL) + if (de_ctx->sig_list != NULL) result = 1; end: - if (de_ctx != NULL) - DetectEngineCtxFree(de_ctx); + if (de_ctx != NULL) SigCleanSignatures(de_ctx); + if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); return result; } diff --git a/src/detect-http-method.c b/src/detect-http-method.c index 9f8c1bb006..98d239c260 100644 --- a/src/detect-http-method.c +++ b/src/detect-http-method.c @@ -336,7 +336,7 @@ int DetectHttpMethodTest03(void) return result; } -/** \test Check a signature with fast_pattern (fail) */ +/** \test Check a signature with fast_pattern (should work) */ int DetectHttpMethodTest04(void) { DetectEngineCtx *de_ctx = NULL; @@ -353,7 +353,7 @@ int DetectHttpMethodTest04(void) "fast_pattern; " "http_method; sid:1;)"); - if (de_ctx->sig_list == NULL) { + if (de_ctx->sig_list != NULL) { result = 1; }