[libgweather/location-object] metar: Plug a memory leak
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgweather/location-object] metar: Plug a memory leak
- Date: Thu, 11 Nov 2021 17:05:59 +0000 (UTC)
commit 470b83c3a27141ef24ce0ec8e122e91de87bb706
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 e82a9179..95001ad1 100644
--- a/libgweather/weather-metar.c
+++ b/libgweather/weather-metar.c
@@ -708,4 +708,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]