From: Victor Julien Date: Thu, 13 Dec 2018 09:07:58 +0000 (+0100) Subject: detect/http-server-body: code cleanup and test cleanups X-Git-Tag: suricata-5.0.0-beta1~248 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58aa9dca65e63a709bf5bcec111f122abae5de8f;p=thirdparty%2Fsuricata.git detect/http-server-body: code cleanup and test cleanups --- diff --git a/src/detect-engine-hsbd.c b/src/detect-engine-hsbd.c index 9ae7cb817c..86a84b1326 100644 --- a/src/detect-engine-hsbd.c +++ b/src/detect-engine-hsbd.c @@ -201,13 +201,11 @@ static int RunTest(struct TestSteps *steps, const char *sig, const char *yaml) { TcpSession ssn; Flow f; - Packet *p = NULL; ThreadVars th_v; - DetectEngineCtx *de_ctx = NULL; DetectEngineThreadCtx *det_ctx = NULL; - int result = 0; - int i = 0; AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc(); + FAIL_IF_NULL(alp_tctx); + memset(&th_v, 0, sizeof(th_v)); memset(&f, 0, sizeof(f)); memset(&ssn, 0, sizeof(ssn)); @@ -224,9 +222,9 @@ static int RunTest(struct TestSteps *steps, const char *sig, const char *yaml) StreamTcpInitConfig(TRUE); - de_ctx = DetectEngineCtxInit(); - if (de_ctx == NULL) - goto end; + DetectEngineCtx *de_ctx = DetectEngineCtxInit(); + FAIL_IF_NULL(de_ctx); + de_ctx->flags |= DE_QUIET; FLOW_INITIALIZE(&f); f.protoctx = (void *)&ssn; @@ -235,76 +233,53 @@ static int RunTest(struct TestSteps *steps, const char *sig, const char *yaml) f.alproto = ALPROTO_HTTP; SCLogDebug("sig %s", sig); - DetectEngineAppendSig(de_ctx, (char *)sig); - - de_ctx->flags |= DE_QUIET; - - if (de_ctx->sig_list == NULL) - goto end; + Signature *s = DetectEngineAppendSig(de_ctx, (char *)sig); + FAIL_IF_NULL(s); SigGroupBuild(de_ctx); DetectEngineThreadCtxInit(&th_v, (void *)de_ctx, (void *)&det_ctx); + FAIL_IF_NULL(det_ctx); struct TestSteps *b = steps; - i = 0; + int i = 0; while (b->input != NULL) { SCLogDebug("chunk %p %d", b, i); - p = UTHBuildPacket(NULL, 0, IPPROTO_TCP); - if (p == NULL) - goto end; + Packet *p = UTHBuildPacket(NULL, 0, IPPROTO_TCP); + FAIL_IF_NULL(p); p->flow = &f; p->flowflags = (b->direction == STREAM_TOSERVER) ? FLOW_PKT_TOSERVER : FLOW_PKT_TOCLIENT; p->flowflags |= FLOW_PKT_ESTABLISHED; p->flags |= PKT_HAS_FLOW|PKT_STREAM_EST; - FLOWLOCK_WRLOCK(&f); int r = AppLayerParserParse(NULL, alp_tctx, &f, ALPROTO_HTTP, b->direction, (uint8_t *)b->input, b->input_size ? b->input_size : strlen((const char *)b->input)); - if (r != 0) { - printf("toserver chunk %d returned %" PRId32 ", expected 0: ", i+1, r); - result = 0; - FLOWLOCK_UNLOCK(&f); - goto end; - } - FLOWLOCK_UNLOCK(&f); + FAIL_IF_NOT(r == 0); /* do detect */ SigMatchSignatures(&th_v, de_ctx, det_ctx, p); int match = PacketAlertCheck(p, 1); - if (b->expect != match) { - printf("rule matching mismatch: "); - goto end; - } + FAIL_IF_NOT(b->expect == match); UTHFreePackets(&p, 1); - p = NULL; b++; i++; } - result = 1; - end: - if (alp_tctx != NULL) - AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); - if (de_ctx != NULL) - DetectEngineCtxFree(de_ctx); + DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); + AppLayerParserThreadCtxFree(alp_tctx); + DetectEngineCtxFree(de_ctx); StreamTcpFreeConfig(TRUE); FLOW_DESTROY(&f); - UTHFreePackets(&p, 1); if (yaml) { HtpConfigRestoreBackup(); ConfRestoreContextBackup(); EngineModeSetIDS(); } - return result; + PASS; } static int DetectEngineHttpServerBodyTest01(void) @@ -423,10 +398,6 @@ static int DetectEngineHttpServerBodyTest01(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -539,10 +510,6 @@ static int DetectEngineHttpServerBodyTest02(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -682,10 +649,6 @@ static int DetectEngineHttpServerBodyTest03(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -812,10 +775,6 @@ static int DetectEngineHttpServerBodyTest04(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -942,10 +901,6 @@ static int DetectEngineHttpServerBodyTest05(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -1072,10 +1027,6 @@ static int DetectEngineHttpServerBodyTest06(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -1202,10 +1153,6 @@ static int DetectEngineHttpServerBodyTest07(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -1332,10 +1279,6 @@ static int DetectEngineHttpServerBodyTest08(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -1463,10 +1406,6 @@ static int DetectEngineHttpServerBodyTest09(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -1594,10 +1533,6 @@ static int DetectEngineHttpServerBodyTest10(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -1725,10 +1660,6 @@ static int DetectEngineHttpServerBodyTest11(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -1856,10 +1787,6 @@ static int DetectEngineHttpServerBodyTest12(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -1987,10 +1914,6 @@ static int DetectEngineHttpServerBodyTest13(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -2118,10 +2041,6 @@ static int DetectEngineHttpServerBodyTest14(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -2249,10 +2168,6 @@ static int DetectEngineHttpServerBodyTest15(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -2428,10 +2343,6 @@ end: HtpConfigRestoreBackup(); ConfRestoreContextBackup(); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -2607,10 +2518,6 @@ end: HtpConfigRestoreBackup(); ConfRestoreContextBackup(); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -2741,10 +2648,6 @@ static int DetectEngineHttpServerBodyTest18(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -2873,10 +2776,6 @@ static int DetectEngineHttpServerBodyTest19(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -3004,10 +2903,6 @@ static int DetectEngineHttpServerBodyTest20(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -3137,10 +3032,6 @@ static int DetectEngineHttpServerBodyTest21(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -3272,10 +3163,6 @@ static int DetectEngineHttpServerBodyTest22(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -3403,10 +3290,6 @@ static int DetectEngineHttpServerBodyFileDataTest01(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -3534,10 +3417,6 @@ static int DetectEngineHttpServerBodyFileDataTest02(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -3673,10 +3552,6 @@ static int DetectEngineHttpServerBodyFileDataTest03(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); diff --git a/src/detect-http-server-body.c b/src/detect-http-server-body.c index 48241b8d2f..8abd9929e4 100644 --- a/src/detect-http-server-body.c +++ b/src/detect-http-server-body.c @@ -61,7 +61,6 @@ static int DetectHttpServerBodySetup(DetectEngineCtx *, Signature *, const char *); static void DetectHttpServerBodyRegisterTests(void); -static void DetectHttpServerBodyFree(void *); static int g_file_data_buffer_id = 0; @@ -73,11 +72,8 @@ void DetectHttpServerBodyRegister(void) sigmatch_table[DETECT_AL_HTTP_SERVER_BODY].name = "http_server_body"; sigmatch_table[DETECT_AL_HTTP_SERVER_BODY].desc = "content modifier to match only on the HTTP response-body"; sigmatch_table[DETECT_AL_HTTP_SERVER_BODY].url = DOC_URL DOC_VERSION "/rules/http-keywords.html#http-server-body"; - sigmatch_table[DETECT_AL_HTTP_SERVER_BODY].Match = NULL; sigmatch_table[DETECT_AL_HTTP_SERVER_BODY].Setup = DetectHttpServerBodySetup; - sigmatch_table[DETECT_AL_HTTP_SERVER_BODY].Free = DetectHttpServerBodyFree; sigmatch_table[DETECT_AL_HTTP_SERVER_BODY].RegisterTests = DetectHttpServerBodyRegisterTests; - sigmatch_table[DETECT_AL_HTTP_SERVER_BODY].flags |= SIGMATCH_NOOPT; g_file_data_buffer_id = DetectBufferTypeRegister("file_data"); @@ -104,27 +100,6 @@ int DetectHttpServerBodySetup(DetectEngineCtx *de_ctx, Signature *s, const char ALPROTO_HTTP); } -/** - * \brief The function to free the http_server_body data. - * - * \param ptr Pointer to the http_server_body. - */ -void DetectHttpServerBodyFree(void *ptr) -{ - SCEnter(); - DetectContentData *hsbd = (DetectContentData *)ptr; - if (hsbd == NULL) - SCReturn; - - if (hsbd->content != NULL) - SCFree(hsbd->content); - - SpmDestroyCtx(hsbd->spm_ctx); - SCFree(hsbd); - - SCReturn; -} - /************************************Unittests*********************************/ #ifdef UNITTESTS @@ -175,8 +150,6 @@ static int DetectHttpServerBodyTest01(void) result = 1; end: - SigGroupCleanup(de_ctx); - SigCleanSignatures(de_ctx); DetectEngineCtxFree(de_ctx); return result; @@ -203,8 +176,6 @@ static int DetectHttpServerBodyTest02(void) result = 1; end: - SigGroupCleanup(de_ctx); - SigCleanSignatures(de_ctx); DetectEngineCtxFree(de_ctx); return result; @@ -231,8 +202,6 @@ static int DetectHttpServerBodyTest03(void) result = 1; end: - SigGroupCleanup(de_ctx); - SigCleanSignatures(de_ctx); DetectEngineCtxFree(de_ctx); return result; @@ -259,8 +228,6 @@ static int DetectHttpServerBodyTest04(void) result = 1; end: - SigGroupCleanup(de_ctx); - SigCleanSignatures(de_ctx); DetectEngineCtxFree(de_ctx); return result; @@ -287,8 +254,6 @@ static int DetectHttpServerBodyTest05(void) result = 1; end: - SigGroupCleanup(de_ctx); - SigCleanSignatures(de_ctx); DetectEngineCtxFree(de_ctx); return result; @@ -400,10 +365,6 @@ static int DetectHttpServerBodyTest06(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -544,10 +505,6 @@ static int DetectHttpServerBodyTest07(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -694,10 +651,6 @@ static int DetectHttpServerBodyTest08(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -857,10 +810,6 @@ static int DetectHttpServerBodyTest09(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -1020,10 +969,6 @@ static int DetectHttpServerBodyTest10(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -1169,10 +1114,6 @@ static int DetectHttpServerBodyTest11(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -1318,10 +1259,6 @@ static int DetectHttpServerBodyTest12(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -1434,10 +1371,6 @@ static int DetectHttpServerBodyTest13(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -1611,7 +1544,6 @@ end: DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } if (de_ctx != NULL) { - SigGroupCleanup(de_ctx); DetectEngineCtxFree(de_ctx); } @@ -1776,7 +1708,6 @@ end: DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } if (de_ctx != NULL) { - SigGroupCleanup(de_ctx); DetectEngineCtxFree(de_ctx); } @@ -2671,10 +2602,6 @@ static int DetectHttpServerBodyFileDataTest02(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -2822,10 +2749,6 @@ static int DetectHttpServerBodyFileDataTest03(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -2985,10 +2908,6 @@ static int DetectHttpServerBodyFileDataTest04(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -3148,10 +3067,6 @@ static int DetectHttpServerBodyFileDataTest05(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -3297,10 +3212,6 @@ static int DetectHttpServerBodyFileDataTest06(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -3446,10 +3357,6 @@ static int DetectHttpServerBodyFileDataTest07(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -3562,10 +3469,6 @@ static int DetectHttpServerBodyFileDataTest08(void) end: if (alp_tctx != NULL) AppLayerParserThreadCtxFree(alp_tctx); - if (de_ctx != NULL) - SigGroupCleanup(de_ctx); - if (de_ctx != NULL) - SigCleanSignatures(de_ctx); if (de_ctx != NULL) DetectEngineCtxFree(de_ctx); @@ -3727,7 +3630,6 @@ end: DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } if (de_ctx != NULL) { - SigGroupCleanup(de_ctx); DetectEngineCtxFree(de_ctx); } @@ -3888,7 +3790,6 @@ end: DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx); } if (de_ctx != NULL) { - SigGroupCleanup(de_ctx); DetectEngineCtxFree(de_ctx); }