Skip to content

Commit

Permalink
flow/var: Release key storage
Browse files Browse the repository at this point in the history
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 2d9df5a)
  • Loading branch information
jlucovsky committed Jan 14, 2025
1 parent a10ee8d commit 2be430e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/flow-var.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 2be430e

Please sign in to comment.