summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2017-05-04 07:29:24 +0200
committerSébastien Helleu <flashcode@flashtux.org>2017-05-04 07:29:24 +0200
commit07b7be0357b262af552c9e61cee1b257b383043b (patch)
tree2868a2b345008927b4a56d03d4379f1ec258d8dc
parentca9e4697f5b0799fcf3926256461db0edabaa071 (diff)
downloadweechat-07b7be0357b262af552c9e61cee1b257b383043b.zip
core: fix memory leak in display of mouse event debug info
-rw-r--r--ChangeLog.adoc1
-rw-r--r--src/gui/gui-key.c14
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)