1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-10 03:33:12 +02:00

core: fix memory leak in evaluation of sub-conditions

This commit is contained in:
Sebastien Helleu
2014-03-02 17:43:19 +01:00
parent 16c13e94a6
commit 4b57c95494
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -603,7 +603,11 @@ eval_expression_condition (const char *expr, struct t_hashtable *pointers,
+ 1;
tmp_value2 = malloc (length);
if (!tmp_value2)
{
if (tmp_value)
free (tmp_value);
goto end;
}
tmp_value2[0] = '\0';
if (pos > expr2)
{
@@ -619,6 +623,8 @@ eval_expression_condition (const char *expr, struct t_hashtable *pointers,
}
free (expr2);
expr2 = tmp_value2;
if (tmp_value)
free (tmp_value);
}
}