summaryrefslogtreecommitdiff
path: root/libgweather
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2021-11-11 16:57:33 +0000
committerEmmanuele Bassi <ebassi@gmail.com>2021-11-17 21:53:05 +0000
commitdec8412d3c3e7e1a0bc46c0bb555aa011ec67d6f (patch)
treed0d5c7fba96d83d7815523b2779ccd0eeebc8942 /libgweather
parentcad69b404e155b297ae19b45885e66ed98e9d7f9 (diff)
downloadlibgweather-dec8412d3c3e7e1a0bc46c0bb555aa011ec67d6f.tar.gz
metar: Plug a memory leak
We need to free the uri object, regardless of whether it is a SoupUri or a GUri.
Diffstat (limited to 'libgweather')
-rw-r--r--libgweather/weather-metar.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libgweather/weather-metar.c b/libgweather/weather-metar.c
index eaa7125..e2895b1 100644
--- a/libgweather/weather-metar.c
+++ b/libgweather/weather-metar.c
@@ -707,4 +707,9 @@ metar_start_open (GWeatherInfo *info)
msg = soup_message_new_from_uri ("GET", uri);
_gweather_info_begin_request (info, msg);
_gweather_info_queue_request (info, msg, metar_finish);
+#if SOUP_CHECK_VERSION(2, 99, 2)
+ g_uri_unref (uri);
+#else
+ soup_uri_free (uri);
+#endif
}