summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Bzatek <[email protected]>2020-07-20 17:34:04 +0200
committerPablo Barciela <[email protected]>2020-08-03 13:46:34 +0200
commit48c444e11dcd8879adbf08dffc1b034b020f1e3b (patch)
tree4f0d5f0308ed527a4c59aae541a866d46c541c20
parentf01509be6820ee1ec0d743241ef396efc58da3fb (diff)
downloadmate-panel-48c444e11dcd8879adbf08dffc1b034b020f1e3b.tar.bz2
mate-panel-48c444e11dcd8879adbf08dffc1b034b020f1e3b.tar.xz
clock: Fix leaking GtkListStore
The gtk_tree_view_set_model() adds its own reference.
-rw-r--r--applets/clock/clock.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/applets/clock/clock.c b/applets/clock/clock.c
index 7ca2019b..0d313faf 100644
--- a/applets/clock/clock.c
+++ b/applets/clock/clock.c
@@ -1030,10 +1030,10 @@ create_cities_store (ClockData *cd)
}
/* City name, Timezone name, Coordinates in lat/long */
- cd->cities_store = g_object_ref (gtk_list_store_new (COL_CITY_LAST,
- G_TYPE_STRING, /* COL_CITY_NAME */
- G_TYPE_STRING, /* COL_CITY_TZ */
- CLOCK_LOCATION_TYPE)); /* COL_CITY_LOC */
+ cd->cities_store = gtk_list_store_new (COL_CITY_LAST,
+ G_TYPE_STRING, /* COL_CITY_NAME */
+ G_TYPE_STRING, /* COL_CITY_TZ */
+ CLOCK_LOCATION_TYPE); /* COL_CITY_LOC */
list = g_list_copy (cities);
list = g_list_sort (list, sort_locations_by_name);