[libgweather/static-fixes: 3/7] Do not return an additional reference




commit 05cb6f606f1c98c47a062cb0b865bae5178365a0
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 26cc30b5..eb345392 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]