aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-03-16 15:55:57 -0500
committerCharles Kerr <charles.kerr@canonical.com>2012-03-16 15:55:57 -0500
commit1f055482724f72a8d18350c6af67d9b8df244019 (patch)
tree9c3782bd49c912d0c43713831f8f8c7f3d77371a
parent343fa36846153463fb2faa3deed3043bdd9d92d8 (diff)
downloadayatana-indicator-datetime-1f055482724f72a8d18350c6af67d9b8df244019.tar.gz
ayatana-indicator-datetime-1f055482724f72a8d18350c6af67d9b8df244019.tar.bz2
ayatana-indicator-datetime-1f055482724f72a8d18350c6af67d9b8df244019.zip
fix memory leak when saving user-specified timezone locations
-rw-r--r--src/datetime-prefs-locations.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/datetime-prefs-locations.c b/src/datetime-prefs-locations.c
index 9c71f8e..cbd7308 100644
--- a/src/datetime-prefs-locations.c
+++ b/src/datetime-prefs-locations.c
@@ -367,7 +367,9 @@ save_to_settings (GObject * store, GSettings * conf)
}
else {
GVariant * locations = g_variant_builder_end (&builder);
- g_settings_set_strv (conf, SETTINGS_LOCATIONS_S, g_variant_get_strv (locations, NULL));
+ const gchar ** strings = g_variant_get_strv (locations, NULL);
+ g_settings_set_strv (conf, SETTINGS_LOCATIONS_S, strings);
+ g_free (strings);
g_variant_unref (locations);
}
}