Re: [Spice-devel] [PATCH spice-server] red-stream-device: Fix leaks in dispose and finalize chaining parent

2018-07-12 Thread Christophe Fergeau

Acked-by: Christophe Fergeau 
On Wed, Jul 11, 2018 at 04:37:14PM +0100, Frediano Ziglio wrote:
> dispose and finalize methods have to call parent relative
> cleanup method to avoid leaking resources.
> 
> Signed-off-by: Frediano Ziglio 
> ---
>  server/red-stream-device.c | 4 
>  1 file changed, 4 insertions(+)
> 
> diff --git a/server/red-stream-device.c b/server/red-stream-device.c
> index 77d0acd06..d293dc1cc 100644
> --- a/server/red-stream-device.c
> +++ b/server/red-stream-device.c
> @@ -586,6 +586,8 @@ stream_device_dispose(GObject *object)
>  red_channel_destroy(RED_CHANNEL(dev->cursor_channel));
>  dev->cursor_channel = NULL;
>  }
> +
> +G_OBJECT_CLASS(stream_device_parent_class)->dispose(object);
>  }
>  
>  static void
> @@ -597,6 +599,8 @@ stream_device_finalize(GObject *object)
>  dev->msg = NULL;
>  dev->msg_len = 0;
>  dev->msg_pos = 0;
> +
> +G_OBJECT_CLASS(stream_device_parent_class)->finalize(object);
>  }
>  
>  void
> -- 
> 2.17.1
> 
> ___
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel


signature.asc
Description: PGP signature
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH spice-server] red-stream-device: Fix leaks in dispose and finalize chaining parent

2018-07-11 Thread Frediano Ziglio
dispose and finalize methods have to call parent relative
cleanup method to avoid leaking resources.

Signed-off-by: Frediano Ziglio 
---
 server/red-stream-device.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/server/red-stream-device.c b/server/red-stream-device.c
index 77d0acd06..d293dc1cc 100644
--- a/server/red-stream-device.c
+++ b/server/red-stream-device.c
@@ -586,6 +586,8 @@ stream_device_dispose(GObject *object)
 red_channel_destroy(RED_CHANNEL(dev->cursor_channel));
 dev->cursor_channel = NULL;
 }
+
+G_OBJECT_CLASS(stream_device_parent_class)->dispose(object);
 }
 
 static void
@@ -597,6 +599,8 @@ stream_device_finalize(GObject *object)
 dev->msg = NULL;
 dev->msg_len = 0;
 dev->msg_pos = 0;
+
+G_OBJECT_CLASS(stream_device_parent_class)->finalize(object);
 }
 
 void
-- 
2.17.1

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