--- 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;
}