From: Po Lu Date: Sat, 8 Jan 2022 03:18:59 +0000 (+0800) Subject: * src/pgtkterm.c (pgtk_enqueue_string): Free return of g_utf8_to_ucs4. X-Git-Tag: emacs-29.0.90~3205 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=63c83e40dad88036d5ceef17eace51056a18b55f;p=emacs.git * src/pgtkterm.c (pgtk_enqueue_string): Free return of g_utf8_to_ucs4. --- diff --git a/src/pgtkterm.c b/src/pgtkterm.c index 1d301d11f6f..1195d53d320 100644 --- a/src/pgtkterm.c +++ b/src/pgtkterm.c @@ -5231,9 +5231,9 @@ pgtk_emacs_to_gtk_modifiers (struct pgtk_display_info *dpyinfo, int state) void pgtk_enqueue_string (struct frame *f, gchar * str) { - gunichar *ustr; + gunichar *ustr, *uptr; - ustr = g_utf8_to_ucs4 (str, -1, NULL, NULL, NULL); + uptr = ustr = g_utf8_to_ucs4 (str, -1, NULL, NULL, NULL); if (ustr == NULL) return; for (; *ustr != 0; ustr++) @@ -5252,6 +5252,7 @@ pgtk_enqueue_string (struct frame *f, gchar * str) evq_enqueue (&inev); } + g_free (uptr); } void