aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-03-16 14:18:22 -0500
committerCharles Kerr <charles.kerr@canonical.com>2012-03-16 14:18:22 -0500
commit343fa36846153463fb2faa3deed3043bdd9d92d8 (patch)
tree67b10d9e6c0f7533f0ba778ffb4f72ae4759d48b
parent4d71bb4b4270c4f15d3ba6aaf0bda7b78307f61f (diff)
parentf281d28db0ae9985f0b0f05d90d8210b2651fd24 (diff)
downloadayatana-indicator-datetime-343fa36846153463fb2faa3deed3043bdd9d92d8.tar.gz
ayatana-indicator-datetime-343fa36846153463fb2faa3deed3043bdd9d92d8.tar.bz2
ayatana-indicator-datetime-343fa36846153463fb2faa3deed3043bdd9d92d8.zip
plug a string leak when updating the appointments
-rw-r--r--src/datetime-service.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/datetime-service.c b/src/datetime-service.c
index a782d80..9c18d9b 100644
--- a/src/datetime-service.c
+++ b/src/datetime-service.c
@@ -821,13 +821,12 @@ update_appointment_menu_items (gpointer user_data)
apt_output = SETTINGS_TIME_12_HOUR;
} else if (g_strcmp0(time_format_str, "24-hour") == 0) {
apt_output = SETTINGS_TIME_24_HOUR;
+ } else if (is_locale_12h()) {
+ apt_output = SETTINGS_TIME_12_HOUR;
} else {
- if (is_locale_12h()) {
- apt_output = SETTINGS_TIME_12_HOUR;
- } else {
- apt_output = SETTINGS_TIME_24_HOUR;
- }
+ apt_output = SETTINGS_TIME_24_HOUR;
}
+ g_free (time_format_str);
GVariantBuilder markeddays;
g_variant_builder_init (&markeddays, G_VARIANT_TYPE ("ai"));