]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
flow/var: Release key storage 12392/head 12404/head
authorJeff Lucovsky <jlucovsky@oisf.net>
Sun, 22 Dec 2024 13:04:58 +0000 (08:04 -0500)
committerJeff Lucovsky <jlucovsky@oisf.net>
Tue, 14 Jan 2025 13:59:52 +0000 (08:59 -0500)
Issue: 7466

This commit releases the memory for the flow variable "key" when
the flow variable is of type string. The key is allocated in the Lua
extension logic.

(cherry picked from commit 2d9df5a1aea4407846ce7e7e2fac58f65eb19073)

src/flow-var.c

index a92358f2714475ffa657e686c4a1670d4608d627..5377607433a0e64f4d1d7f479d873bb7abbddeaa 100644 (file)
@@ -166,6 +166,7 @@ void FlowVarFree(FlowVar *fv)
     if (fv->datatype == FLOWVAR_TYPE_STR) {
         if (fv->data.fv_str.value != NULL)
             SCFree(fv->data.fv_str.value);
+        SCFree(fv->key);
     }
     SCFree(fv);
 }