[libgweather/gnome-3-26] lib: Fix memory and D-Bus match rule leaks



commit 449a216514655fe2b3f0eead911137e1732d7c08
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Mar 15 14:42:15 2018 +0100

    lib: Fix memory and D-Bus match rule leaks
    
    From #3:
    > The GWeatherInfo settings object is never freed leading not only
    > to a memory leak, but also to a dbus match rule leak, which on
    > the system bus can quickly result in reaching the maximum amount
    > of allowed match rules. See gnome-shell#96.

 libgweather/gweather-weather.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/libgweather/gweather-weather.c b/libgweather/gweather-weather.c
index be08c8d..0103d75 100644
--- a/libgweather/gweather-weather.c
+++ b/libgweather/gweather-weather.c
@@ -745,6 +745,7 @@ gweather_info_finalize (GObject *object)
     GWeatherInfoPrivate *priv = info->priv;
 
     _weather_location_free (&priv->location);
+    g_clear_object (&priv->settings);
 
     if (priv->glocation)
        gweather_location_unref (priv->glocation);


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