[libgweather/location-object: 4/6] metar: Plug a memory leak
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgweather/location-object: 4/6] metar: Plug a memory leak
- Date: Wed, 17 Nov 2021 21:53:06 +0000 (UTC)
commit dec8412d3c3e7e1a0bc46c0bb555aa011ec67d6f
Author: Emmanuele Bassi <ebassi gnome org>
Date: Thu Nov 11 16:57:33 2021 +0000
metar: Plug a memory leak
We need to free the uri object, regardless of whether it is a SoupUri or
a GUri.
libgweather/weather-metar.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/libgweather/weather-metar.c b/libgweather/weather-metar.c
index eaa71250..e2895b10 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
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]