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 | |
parent | ca9e4697f5b0799fcf3926256461db0edabaa071 (diff) | |
download | weechat-07b7be0357b262af552c9e61cee1b257b383043b.zip |
core: fix memory leak in display of mouse event debug info
-rw-r--r-- | ChangeLog.adoc | 1 | ||||
-rw-r--r-- | src/gui/gui-key.c | 14 |
2 files changed, 10 insertions, 5 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc index e8f3cc474..273be46a1 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -44,6 +44,7 @@ Improvements:: Bug fixes:: + * core: fix memory leak in display of mouse event debug info * core: fix command /cursor stop (do not toggle cursor mode) (issue #964) * core: fix delayed refresh when the signal SIGWINCH is received (terminal resized), send signal "signal_sigwinch" after refreshes (issue #902) * irc: fix crash in case of invalid server reply during SASL authentication with dh-blowfish or dh-aes mechanism 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) |