diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2017-05-04 07:29:24 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2017-05-04 07:29:24 +0200 |
commit | 07b7be0357b262af552c9e61cee1b257b383043b (patch) | |
tree | 2868a2b345008927b4a56d03d4379f1ec258d8dc /src/gui | |
parent | ca9e4697f5b0799fcf3926256461db0edabaa071 (diff) | |
download | weechat-07b7be0357b262af552c9e61cee1b257b383043b.zip |
core: fix memory leak in display of mouse event debug info
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/gui-key.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/gui/gui-key.c b/src/gui/gui-key.c index b4882b258..1fcfcb82c 100644 --- a/src/gui/gui-key.c +++ b/src/gui/gui-key.c @@ -1107,12 +1107,16 @@ gui_key_focus_command (const char *key, int context, { gui_chat_printf (NULL, _("Hashtable focus:")); list_keys = hashtable_get_list_keys (hashtable); - for (ptr_item = list_keys->items; ptr_item; - ptr_item = ptr_item->next_item) + if (list_keys) { - gui_chat_printf (NULL, " %s: \"%s\"", - ptr_item->data, - hashtable_get (hashtable, ptr_item->data)); + for (ptr_item = list_keys->items; ptr_item; + ptr_item = ptr_item->next_item) + { + gui_chat_printf (NULL, " %s: \"%s\"", + ptr_item->data, + hashtable_get (hashtable, ptr_item->data)); + } + weelist_free (list_keys); } } if (debug) |