[gssdp] gssdp-socket-source: Fix the destroy/unref order on a GSource



commit 50cd3e97cd125c320ebd5b2fffd9ab0f3179a2f6
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Thu Apr 24 16:58:21 2014 +0100

    gssdp-socket-source: Fix the destroy/unref order on a GSource
    
    g_source_destroy() should always be called before g_source_unref().
    
    https://bugzilla.gnome.org/show_bug.cgi?id=728888

 libgssdp/gssdp-socket-source.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libgssdp/gssdp-socket-source.c b/libgssdp/gssdp-socket-source.c
index fe5f3df..ee52f9d 100644
--- a/libgssdp/gssdp-socket-source.c
+++ b/libgssdp/gssdp-socket-source.c
@@ -370,8 +370,8 @@ gssdp_socket_source_dispose (GObject *object)
         self = GSSDP_SOCKET_SOURCE (object);
 
         if (self->priv->source != NULL) {
-                g_source_unref (self->priv->source);
                 g_source_destroy (self->priv->source);
+                g_source_unref (self->priv->source);
                 self->priv->source = NULL;
         }
 


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