summaryrefslogtreecommitdiff
path: root/applets/clock
diff options
context:
space:
mode:
authorTomas Bzatek <[email protected]>2020-07-20 17:34:04 +0200
committerLuke from DC <[email protected]>2020-07-29 20:47:20 +0000
commita1db813cd47ca495f9481f2874ecfeb74ea120b5 (patch)
treeb68ea38ecd1e8207f2b42c0808ff4b74717bf91f /applets/clock
parent2b2ed2831a79e75fa9691290cefb266f019abb66 (diff)
downloadmate-panel-a1db813cd47ca495f9481f2874ecfeb74ea120b5.tar.bz2
mate-panel-a1db813cd47ca495f9481f2874ecfeb74ea120b5.tar.xz
clock: Fix leaking GtkListStore
The gtk_tree_view_set_model() adds its own reference.
Diffstat (limited to 'applets/clock')
-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 66be5e30..87ef1baa 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);