[gtk/gtk-3-24] imwayland: Plug leaks



commit 336f3827285f37600fa504dc201dd83e487de27b
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Oct 30 21:57:09 2018 +0100

    imwayland: Plug leaks
    
    The various strings (pending/current preedit, surrounding, and commit
    buffer) are being leaked in the case of GtkIMContext destruction.

 modules/input/imwayland.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/modules/input/imwayland.c b/modules/input/imwayland.c
index 05e8c0c3d7..66848ac98c 100644
--- a/modules/input/imwayland.c
+++ b/modules/input/imwayland.c
@@ -479,6 +479,10 @@ gtk_im_context_wayland_finalize (GObject *object)
 
   g_clear_object (&context->window);
   g_clear_object (&context->gesture);
+  g_free (context->surrounding.text);
+  g_free (context->current_preedit.text);
+  g_free (context->pending_preedit.text);
+  g_free (context->pending_commit);
 
   G_OBJECT_CLASS (parent_class)->finalize (object);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]