[gnome-initial-setup/wjt/gweather-updates] timezone: Don't leak location from entry




commit 2a3f63fe42bab8770fd0bbf70578735c57295053
Author: Will Thompson <wjt endlessos org>
Date:   Tue Jan 12 20:33:29 2021 +0000

    timezone: Don't leak location from entry
    
    gweather_location_entry_get_location()'s return value is transfer full,
    but previously we leaked the value.
    
    Spotted while reviewing whether adjustments are needed for libgweather
    40's API changes (#119).

 gnome-initial-setup/pages/timezone/gis-timezone-page.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/gnome-initial-setup/pages/timezone/gis-timezone-page.c 
b/gnome-initial-setup/pages/timezone/gis-timezone-page.c
index 5906d690..e1882083 100644
--- a/gnome-initial-setup/pages/timezone/gis-timezone-page.c
+++ b/gnome-initial-setup/pages/timezone/gis-timezone-page.c
@@ -243,6 +243,8 @@ entry_location_changed (GObject *object, GParamSpec *param, GisTimezonePage *pag
   priv->in_search = TRUE;
   set_location (page, location);
   priv->in_search = FALSE;
+
+  gweather_location_unref (location);
 }
 
 #define GETTEXT_PACKAGE_TIMEZONES "gnome-control-center-2.0-timezones"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]