aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-09-05 13:01:07 -0500
committerCharles Kerr <charles.kerr@canonical.com>2013-09-05 13:01:07 -0500
commitfdd57db6d6a81951da34675ee89e6e0f1b77b59e (patch)
treebf737851dc78bc800ada644baa9861c6df47783b /src
parentd79408477c6fae230193f11be058c564f230ab8f (diff)
downloadayatana-indicator-datetime-fdd57db6d6a81951da34675ee89e6e0f1b77b59e.tar.gz
ayatana-indicator-datetime-fdd57db6d6a81951da34675ee89e6e0f1b77b59e.tar.bz2
ayatana-indicator-datetime-fdd57db6d6a81951da34675ee89e6e0f1b77b59e.zip
use GSlice for allocating/freeing service's TimeLocation structs
Diffstat (limited to 'src')
-rw-r--r--src/service.c4
1 files changed, 2 insertions, 2 deletions
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);