From: Philippe Antoine Date: Mon, 27 Nov 2023 10:10:50 +0000 (+0100) Subject: detect/filestore: fix memory leak on sig parsing X-Git-Tag: suricata-8.0.0-beta1~2031 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9895%2Fhead;p=thirdparty%2Fsuricata.git detect/filestore: fix memory leak on sig parsing Ticket: 6574 Introduced by commit c272a646c5ae739d18901776cc5a940afd3d3d38 --- diff --git a/src/detect-filestore.c b/src/detect-filestore.c index 5e22e4c6cd..07bbd91ff1 100644 --- a/src/detect-filestore.c +++ b/src/detect-filestore.c @@ -455,6 +455,7 @@ static int DetectFilestoreSetup (DetectEngineCtx *de_ctx, Signature *s, const ch if (SigMatchAppendSMToList( de_ctx, s, DETECT_FILESTORE, (SigMatchCtx *)fd, g_file_match_list_id) == NULL) { + DetectFilestoreFree(de_ctx, fd); goto error; } s->filestore_ctx = fd;