gssdp-socket-source: Fix the destroy/unref order on a GSource
authorPhilip Withnall <philip.withnall@collabora.co.uk>
Thu, 24 Apr 2014 15:58:21 +0000 (16:58 +0100)
committerPhilip Withnall <philip.withnall@collabora.co.uk>
Thu, 24 Apr 2014 15:59:19 +0000 (16:59 +0100)
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

index fe5f3df..ee52f9d 100644 (file)
@@ -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;
         }