[Wayland-bugs] [Bug 787069] gdk_keymap_get_entries_for_keyval() returns TRUE with n_keys=0 in Wayland
gtk+ (GNOME Bugzilla)
bugzilla at gnome.org
Thu Aug 31 22:43:49 UTC 2017
https://bugzilla.gnome.org/show_bug.cgi?id=787069
--- Comment #2 from Christian Persch <chpe at gnome.org> ---
Existing code using this may do
if (gdk_keymap_get_entries_for_keyval(..., &keys, &n_keys)) {
/* do something */
g_free(keys);
}
(e.g. firefox does this).
The patch returns FALSE on n_keys == 0, but still keys != NULL, which means a
leak on the code pattern above. Should also change to set return keys = NULL in
this case, I think.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-bugs/attachments/20170831/24cadf73/attachment.html>
More information about the wayland-bugs
mailing list