From 63c83e40dad88036d5ceef17eace51056a18b55f Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sat, 8 Jan 2022 11:18:59 +0800 Subject: [PATCH] * src/pgtkterm.c (pgtk_enqueue_string): Free return of g_utf8_to_ucs4. --- src/pgtkterm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 -- 2.39.5