[gnome-initial-setup/gnome-3-38] timezone: Don't leak location from entry
- From: Will Thompson <wjt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup/gnome-3-38] timezone: Don't leak location from entry
- Date: Wed, 13 Jan 2021 11:02:23 +0000 (UTC)
commit c69251ec7d08eb5c7af335bbcdcb090954da7c57
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).
(cherry picked from commit 2a3f63fe42bab8770fd0bbf70578735c57295053)
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]