[PATCH spice-gtk 3/4] qmp: release channel on dispose

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

 



From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>

Do not leak the strong channel ref.

Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
---
 src/qmp-port.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/qmp-port.c b/src/qmp-port.c
index bdc0c7e..89b27aa 100644
--- a/src/qmp-port.c
+++ b/src/qmp-port.c
@@ -203,6 +203,8 @@ static void spice_qmp_port_dispose(GObject *gobject)
     g_object_set_data(G_OBJECT(self->priv->channel),
                       "spice-qmp-port", NULL);
 
+    g_clear_object(&self->priv->channel);
+
     if (G_OBJECT_CLASS(spice_qmp_port_parent_class)->dispose)
         G_OBJECT_CLASS(spice_qmp_port_parent_class)->dispose(gobject);
 }
-- 
2.19.0.271.gfe8321ec05

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]