1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-28 22:06:38 +02:00

core: fix memory leak in display of empty bar items

This commit is contained in:
Sebastien Helleu
2011-08-25 20:15:55 +02:00
parent 9a299e1ab3
commit 8d20b217d4
2 changed files with 8 additions and 2 deletions
+2 -1
View File
@@ -1,12 +1,13 @@
WeeChat ChangeLog
=================
Sébastien Helleu <flashcode@flashtux.org>
v0.3.6-dev, 2011-08-21
v0.3.6-dev, 2011-08-25
Version 0.3.6 (under dev!)
--------------------------
* core: fix memory leak in display of empty bar items
* core: fix input of wide UTF-8 chars under Cygwin (bug #34061)
* core: allow name of buffer for command /buffer clear (task #11269)
* core: add new command /repeat (execute a command several times)
+6 -1
View File
@@ -309,7 +309,12 @@ gui_bar_item_get_value (struct t_gui_bar *bar, struct t_gui_window *window,
item_value = (ptr_item->build_callback) (ptr_item->build_callback_data,
ptr_item, window);
}
if (!item_value || !item_value[0])
if (item_value && !item_value[0])
{
free (item_value);
item_value = NULL;
}
if (!item_value)
return NULL;
}