]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect/filestore: fix memory leak on sig parsing 9895/head
authorPhilippe Antoine <pantoine@oisf.net>
Mon, 27 Nov 2023 10:10:50 +0000 (11:10 +0100)
committerPhilippe Antoine <pantoine@oisf.net>
Mon, 27 Nov 2023 10:29:30 +0000 (11:29 +0100)
Ticket: 6574

Introduced by commit c272a646c5ae739d18901776cc5a940afd3d3d38

src/detect-filestore.c

index 5e22e4c6cde5b451940d222375c47b83d5b631eb..07bbd91ff19982ca1b0016c48f5fb011f48152d8 100644 (file)
@@ -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;