]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
flow/var: Release key storage
authorJeff Lucovsky <jlucovsky@oisf.net>
Sun, 22 Dec 2024 13:04:58 +0000 (08:04 -0500)
committerVictor Julien <victor@inliniac.net>
Wed, 8 Jan 2025 16:06:02 +0000 (17:06 +0100)
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.

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);
 }