[libgweather/wip/chergert/plug-leaks: 6/7] location: plug various leaks
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgweather/wip/chergert/plug-leaks: 6/7] location: plug various leaks
- Date: Tue, 10 Mar 2020 23:41:39 +0000 (UTC)
commit 2924f666bd8230c2b16c4deea2b100a4059d7b12
Author: Christian Hergert <chergert redhat com>
Date: Tue Mar 10 15:27:11 2020 -0700
location: plug various leaks
libgweather/gweather-location.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/libgweather/gweather-location.c b/libgweather/gweather-location.c
index b386641..0a4b956 100644
--- a/libgweather/gweather-location.c
+++ b/libgweather/gweather-location.c
@@ -1538,7 +1538,8 @@ gweather_location_common_deserialize (GWeatherLocation *world,
longitude / M_PI * 180.0);
if (found && (g_strcmp0 (name, found->english_name) == 0 ||
g_strcmp0 (name, found->local_name) == 0))
- return gweather_location_ref (found);
+ return g_steal_pointer (&found);
+ g_clear_pointer (&found, gweather_location_unref);
}
if (station_code[0] == '\0')
@@ -1674,6 +1675,9 @@ gweather_location_format_two_deserialize (GWeatherLocation *world,
parent_longitude = 0;
}
+ g_variant_unref (latlon_variant);
+ g_variant_unref (parent_latlon_variant);
+
return gweather_location_common_deserialize(world, name, station_code, is_city,
latlon_valid, latitude, longitude,
parent_latlon_valid, parent_latitude, parent_longitude);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]