On Wed, Sep 26, 2018 at 06:56:23PM +0400, marcandre.lur...@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lur...@redhat.com>
> 
> Do not leak the strong channel ref.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com>
> ---
>  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);
> +

Maybe remove the g_object_set_data above?

>      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
> 

Attachment: signature.asc
Description: PGP signature

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

Reply via email to