Skip to content

Commit

Permalink
address parsing: fix memory leak in error path
Browse files Browse the repository at this point in the history
  • Loading branch information
victorjulien committed Jan 17, 2017
1 parent a6fccd9 commit f964cdb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/detect-engine-address.c
Original file line number Diff line number Diff line change
Expand Up @@ -959,8 +959,11 @@ static int DetectAddressParse2(const DetectEngineCtx *de_ctx,

if (DetectAddressParse2(de_ctx, gh, ghn, temp_rule_var_address,
(negate + n_set) % 2, var_list) < 0)
{
if (temp_rule_var_address != rule_var_address)
SCFree(temp_rule_var_address);
goto error;

}
d_set = 0;
n_set = 0;
if (temp_rule_var_address != rule_var_address)
Expand Down

0 comments on commit f964cdb

Please sign in to comment.