[Spice-devel,v5,1/8] Call parent finalize at the and of display_channel_finalize

Submitted by Frediano Ziglio on Dec. 5, 2016, 12:15 p.m.

Details

Message ID cbcd3f31df74a8e965692d2dbe81c24418b59ddd.1480940153.git-series.fziglio@redhat.com
State Accepted
Headers show
Series "Start cleaning objects on destruction" ( rev: 7 ) in Spice

Not browsing as part of any series.

Commit Message

Frediano Ziglio Dec. 5, 2016, 12:15 p.m.
Make finalization of DisplayChannel consistent with other code.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
---
 server/display-channel.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/server/display-channel.c b/server/display-channel.c
index 061a99d..bd9d2be 100644
--- a/server/display-channel.c
+++ b/server/display-channel.c
@@ -75,10 +75,10 @@  display_channel_finalize(GObject *object)
 {
     DisplayChannel *self = DISPLAY_CHANNEL(object);
 
-    G_OBJECT_CLASS(display_channel_parent_class)->finalize(object);
-
     g_array_unref(self->priv->video_codecs);
     g_free(self->priv);
+
+    G_OBJECT_CLASS(display_channel_parent_class)->finalize(object);
 }
 
 static void drawable_draw(DisplayChannel *display, Drawable *drawable);

Comments

Acked-by: Jonathon Jongsma <jjongsma@redhat.com>


On Mon, 2016-12-05 at 12:15 +0000, Frediano Ziglio wrote:
> Make finalization of DisplayChannel consistent with other code.
> 
> Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
> ---
>  server/display-channel.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/server/display-channel.c b/server/display-channel.c
> index 061a99d..bd9d2be 100644
> --- a/server/display-channel.c
> +++ b/server/display-channel.c
> @@ -75,10 +75,10 @@ display_channel_finalize(GObject *object)
>  {
>      DisplayChannel *self = DISPLAY_CHANNEL(object);
>  
> -    G_OBJECT_CLASS(display_channel_parent_class)->finalize(object);
> -
>      g_array_unref(self->priv->video_codecs);
>      g_free(self->priv);
> +
> +    G_OBJECT_CLASS(display_channel_parent_class)->finalize(object);
>  }
>  
>  static void drawable_draw(DisplayChannel *display, Drawable
> *drawable);