core: fix memory leak in evaluation of sub-conditions
This commit is contained in:
parent
16c13e94a6
commit
4b57c95494
@ -13,6 +13,7 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
|
||||
|
||||
== Version 0.4.4 (under dev)
|
||||
|
||||
* core: fix memory leak in evaluation of sub-conditions
|
||||
* core: fix memory leak in function gui_key_add_to_infolist (in case of
|
||||
insufficient memory)
|
||||
* core: fix use of invalid pointer in function gui_bar_window_content_alloc
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user