loudmouth/lm-connection.c
changeset 128 a1f41ebde5c4
parent 126 a5582ec2a9ec
child 130 b88a70fb8525
--- a/loudmouth/lm-connection.c	Sun Aug 14 12:48:42 2005 +0000
+++ b/loudmouth/lm-connection.c	Tue Aug 16 00:17:41 2005 +0000
@@ -217,7 +217,12 @@
 	}
 
 	g_queue_free (connection->incoming_messages);
-	g_free (connection);
+        
+        if (connection->context) {
+                g_main_context_unref (connection->context);
+        }
+        
+        g_free (connection);
 }
 
 static void
@@ -1211,7 +1216,7 @@
 	connection = lm_connection_new (server);
 	connection->context = context;
 
-	g_main_context_ref (connection->context);
+        g_main_context_ref (connection->context);
 
 	return connection;
 }