summaryrefslogtreecommitdiff
path: root/capplets/time-admin/src/time-zone.c
diff options
context:
space:
mode:
authorzhuyaliang <[email protected]>2019-06-25 18:11:45 +0800
committerzhuyaliang <[email protected]>2019-06-25 18:11:45 +0800
commit2bccfe30196b7d2c0f11b9e789e10705f97e56a5 (patch)
tree3cb6fa4370da094304815b9640434b480f938d72 /capplets/time-admin/src/time-zone.c
parentdcadc0ec7ce7ec5a7f4b42a6b07ee76922ba5569 (diff)
downloadmate-control-center-2bccfe30196b7d2c0f11b9e789e10705f97e56a5.tar.bz2
mate-control-center-2bccfe30196b7d2c0f11b9e789e10705f97e56a5.tar.xz
Remove compilation warnings
Diffstat (limited to 'capplets/time-admin/src/time-zone.c')
-rw-r--r--capplets/time-admin/src/time-zone.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/capplets/time-admin/src/time-zone.c b/capplets/time-admin/src/time-zone.c
index 7cb90e62..e6106f1b 100644
--- a/capplets/time-admin/src/time-zone.c
+++ b/capplets/time-admin/src/time-zone.c
@@ -345,13 +345,13 @@ static void LoadCities (TzLocation *loc,
static void CreateCityList(TimeAdmin *ta)
{
- g_autoptr(TzDB) db = NULL;
-
+ TzDB *db;
ta->CityListStore = gtk_list_store_new (CITY_NUM_COLS,G_TYPE_STRING,G_TYPE_STRING);
db = tz_load_db ();
g_ptr_array_foreach (db->locations, (GFunc) LoadCities, ta->CityListStore);
+ TimeZoneDateBaseFree(db);
}
static GtkWidget *CreateZoneFrame(TimeAdmin *ta)
{
@@ -641,11 +641,13 @@ TzInfo *tz_info_from_location (TzLocation *loc)
}
glong tz_location_get_utc_offset (TzLocation *loc)
{
- g_autoptr(TzInfo) tz_info = NULL;
+ TzInfo *tz_info;
glong offset;
tz_info = tz_info_from_location (loc);
offset = tz_info->utc_offset;
+ tz_info_free (tz_info);
+
return offset;
}
void RunTimeZoneDialog (GtkButton *button,