Patch: add missing unref in TnySessionCamel



	Hi,

	This patch adds a missing unref in TnySessionCamel (and removes the
commentary pointing out that we needed reference counting :).

Changelog:
* libtinymail-camel/tny-session-camel.c: added missing unref in
set_device.

-- 
José Dapena Paz <jdapena igalia com>
Igalia
diff --git a/libtinymail-camel/tny-session-camel.c b/libtinymail-camel/tny-session-camel.c
index c759d88..6072cc5 100644
--- a/libtinymail-camel/tny-session-camel.c
+++ b/libtinymail-camel/tny-session-camel.c
@@ -986,8 +986,8 @@ tny_session_camel_set_device (TnySessionCamel *self, TnyDevice *device)
 			priv->connchanged_signal);
 	}
 
-	/* TNY TODO: proper reference counting here please! Note that we can't
-	 * have embraced references either. So be careful! */
+	if (priv->device)
+		g_object_unref (device);
 
 	priv->device = g_object_ref (device);
 


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