From fdd57db6d6a81951da34675ee89e6e0f1b77b59e Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 5 Sep 2013 13:01:07 -0500 Subject: use GSlice for allocating/freeing service's TimeLocation structs --- src/service.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/service.c') diff --git a/src/service.c b/src/service.c index 4c51e31..c36e996 100644 --- a/src/service.c +++ b/src/service.c @@ -908,7 +908,7 @@ time_location_free (struct TimeLocation * loc) g_date_time_unref (loc->local_time); g_free (loc->name); g_free (loc->zone); - g_free (loc); + g_slice_free (struct TimeLocation, loc); } static struct TimeLocation* @@ -916,7 +916,7 @@ time_location_new (const char * zone, const char * name, gboolean visible) { - struct TimeLocation * loc = g_new (struct TimeLocation, 1); + struct TimeLocation * loc = g_slice_new (struct TimeLocation); GTimeZone * tz = g_time_zone_new (zone); loc->zone = g_strdup (zone); loc->name = g_strdup (name); -- cgit v1.2.3