From a1db813cd47ca495f9481f2874ecfeb74ea120b5 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(-) (limited to 'applets/clock') 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); -- cgit v1.2.1