[Spice-devel] [spice-gtk v1 2/2] spice-widget: fix leak of boxed type cursor-shape

Victor Toso victortoso at redhat.com
Tue Apr 3 14:11:36 UTC 2018


From: Victor Toso <me at victortoso.com>

No valgrind on this one but a leak similar to previous patch.
This one was introduced in e691954be459087

Signed-off-by: Victor Toso <victortoso at redhat.com>
---
 src/spice-widget.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/spice-widget.c b/src/spice-widget.c
index b60ca2b..1b79ad3 100644
--- a/src/spice-widget.c
+++ b/src/spice-widget.c
@@ -2993,6 +2993,7 @@ static void channel_new(SpiceSession *s, SpiceChannel *channel, gpointer data)
         g_object_get(G_OBJECT(channel), "cursor", &cursor_shape, NULL);
         if (cursor_shape != NULL) {
             cursor_set(d->cursor, NULL, display);
+            g_boxed_free(spice_cursor_shape_get_type(), cursor_shape);
         }
         return;
     }
-- 
2.16.2



More information about the Spice-devel mailing list