From 48c444e11dcd8879adbf08dffc1b034b020f1e3b Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Mon, 20 Jul 2020 17:34:04 +0200 Subject: clock: Fix leaking GtkListStore The gtk_tree_view_set_model() adds its own reference. --- applets/clock/clock.c | 8 ++++---- 1 file 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); -- cgit v1.2.1