summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2018-03-15 14:42:15 +0100
committerBastien Nocera <hadess@hadess.net>2018-03-15 14:46:04 +0100
commit5236ce83f1c56cf81f4a7988dcfe3fd7e3c7ee1a (patch)
treee03da6a5c545fc6debb8bf8c9ede2b2f6a1c207c
parenta95f8b748a58c044280627ae3be411ffddfce481 (diff)
downloadlibgweather-5236ce83f1c56cf81f4a7988dcfe3fd7e3c7ee1a.tar.gz
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.
-rw-r--r--libgweather/gweather-weather.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libgweather/gweather-weather.c b/libgweather/gweather-weather.c
index 6ece656..571a3e0 100644
--- a/libgweather/gweather-weather.c
+++ b/libgweather/gweather-weather.c
@@ -738,6 +738,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);