[libgweather/static-fixes: 3/6] Do not return an additional reference
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgweather/static-fixes: 3/6] Do not return an additional reference
- Date: Fri, 12 Nov 2021 13:51:46 +0000 (UTC)
commit dd15f8a894ca0d9d40aa8a1ac9f2c27d92772925
Author: Emmanuele Bassi <ebassi gnome org>
Date: Fri Nov 12 13:38:53 2021 +0000
Do not return an additional reference
When finding the nearest city we already acquire a reference on the
location; we should not acquire an additional one.
libgweather/gweather-location.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/libgweather/gweather-location.c b/libgweather/gweather-location.c
index 337a6ba4..03004371 100644
--- a/libgweather/gweather-location.c
+++ b/libgweather/gweather-location.c
@@ -771,7 +771,7 @@ gweather_location_find_nearest_city_full (GWeatherLocation *loc,
if (loc != world)
gweather_location_unref (loc);
- return gweather_location_ref (data.location);
+ return data.location;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]