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.
  • Loading branch information
jlucovsky committed Dec 22, 2024
1 parent 6f937c7 commit 8cd8d3f
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 8cd8d3f

Please sign in to comment.