Use GSlice for allocation of LmConnection instead of g_new.
authorMikael Hallendal <micke@imendio.com>
Fri, 20 Jun 2008 13:20:24 +0200
changeset 410 73551e44fc87
parent 409 28db6371a13b
child 411 d71badcc686e
Use GSlice for allocation of LmConnection instead of g_new.
loudmouth/lm-connection.c
--- a/loudmouth/lm-connection.c	Fri Jun 20 13:14:47 2008 +0200
+++ b/loudmouth/lm-connection.c	Fri Jun 20 13:20:24 2008 +0200
@@ -254,7 +254,7 @@
 		lm_socket_unref (connection->socket);
 	}
 
-        g_free (connection);
+        g_slice_free (LmConnection, connection);
 }
 
 static LmHandlerResult
@@ -1183,7 +1183,7 @@
 	lm_debug_init ();
 	_lm_sock_library_init ();
 
-	connection = g_new0 (LmConnection, 1);
+	connection = g_slice_new0 (LmConnection);
 
 	if (server) {
 		connection->server  = _lm_utils_hostname_to_punycode (server);