From 6d14b2b45c111bc99d6ecbbf81b30edbdd61a191 Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Thu, 24 Feb 2011 11:52:00 +0000 Subject: Let glib allocate the GList element for us GList elements are usually allocated using the slice allocator, not pure malloc, but we can't rely on that. So instead of allocating the structure ourselves use the dedicated allocation function. --- telepathy-logger/log-manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telepathy-logger/log-manager.c b/telepathy-logger/log-manager.c index 5974efa..e076561 100644 --- a/telepathy-logger/log-manager.c +++ b/telepathy-logger/log-manager.c @@ -235,7 +235,7 @@ _take_list (GList *list) if (list != NULL) { - copy = g_new0 (GList, 1); + copy = g_list_alloc (); memcpy (copy, list, sizeof (GList)); memset (list, 0, sizeof (GList)); } -- cgit v1.2.1