1
0
Fork 0

cally: Use g_string_free() return value

glib now warns if the return value is not used, so use the API as
intended instead of assigning the character data separately before
freeing the GString.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2889>
This commit is contained in:
Florian Müllner 2023-03-04 13:06:06 +01:00 committed by Marge Bot
parent aad0baf70d
commit 4a97da3675

View file

@ -224,8 +224,7 @@ atk_key_event_from_clutter_event_key (ClutterKeyEvent *clutter_event,
new = g_string_new ("");
new = g_string_insert_unichar (new, 0, key_unichar);
atk_event->string = new->str;
g_string_free (new, FALSE);
atk_event->string = g_string_free (new, FALSE);
}
else
atk_event->string = NULL;