[libgweather/gnome-3-28] lib: Fix memory and D-Bus match rule leaks
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgweather/gnome-3-28] lib: Fix memory and D-Bus match rule leaks
- Date: Thu, 15 Mar 2018 14:09:29 +0000 (UTC)
commit bc25f8aa927b794abfcc1b2266546600bacb4b6d
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 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]