1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-05 01:03:14 +02:00

core: fix memory leak in function gui_key_add_to_infolist (in case of insufficient memory)

This commit is contained in:
Sebastien Helleu
2014-02-22 15:22:27 +01:00
parent b8f07e935a
commit a0651e11bd
2 changed files with 5 additions and 0 deletions
+3
View File
@@ -1914,7 +1914,10 @@ gui_key_add_to_infolist (struct t_infolist *infolist, struct t_gui_key *key)
if (expanded_key)
{
if (!infolist_new_var_string (ptr_item, "key", expanded_key))
{
free (expanded_key);
return 0;
}
free (expanded_key);
}
if (!infolist_new_var_integer (ptr_item, "area_type1", key->area_type[0]))