parent
aa7493d8c0
commit
6199e4a781
@ -0,0 +1,25 @@
|
||||
From 509acb647462c5bd5c4b782076cb46a60dff9f07 Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Sun, 7 Jul 2024 22:48:51 +0200
|
||||
Subject: [PATCH] mmcli: fix a memory leak
|
||||
|
||||
Poor modem_uid got left behind.
|
||||
---
|
||||
cli/mmcli-common.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/cli/mmcli-common.c b/cli/mmcli-common.c
|
||||
index 404749321..11a7af9c4 100644
|
||||
--- a/cli/mmcli-common.c
|
||||
+++ b/cli/mmcli-common.c
|
||||
@@ -1045,6 +1045,7 @@ mmcli_get_sim_sync (GDBusConnection *connection,
|
||||
}
|
||||
|
||||
g_list_free_full (modems, g_object_unref);
|
||||
+ g_free (modem_uid);
|
||||
g_free (sim_path);
|
||||
|
||||
if (o_manager)
|
||||
--
|
||||
2.45.2
|
||||
|
@ -0,0 +1,43 @@
|
||||
From 664d748a934bbb7ff295b4cf0dd3557b316d9c35 Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Thu, 23 May 2024 14:45:22 +0200
|
||||
Subject: [PATCH] ublox/helpers: fix propagation of +URAT response parse error
|
||||
|
||||
The fallback error handling branch happens much too late, just leaking the
|
||||
newly made GError instead of propagating.
|
||||
---
|
||||
src/plugins/ublox/mm-modem-helpers-ublox.c | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/plugins/ublox/mm-modem-helpers-ublox.c b/src/plugins/ublox/mm-modem-helpers-ublox.c
|
||||
index 0fd1c5b0b..a494dd027 100644
|
||||
--- a/src/plugins/ublox/mm-modem-helpers-ublox.c
|
||||
+++ b/src/plugins/ublox/mm-modem-helpers-ublox.c
|
||||
@@ -1812,18 +1812,18 @@ mm_ublox_parse_urat_read_response (const gchar *response,
|
||||
}
|
||||
}
|
||||
|
||||
+ if (!inner_error && allowed == MM_MODEM_MODE_NONE) {
|
||||
+ inner_error = g_error_new (MM_CORE_ERROR, MM_CORE_ERROR_FAILED,
|
||||
+ "Couldn't parse +URAT response: %s", response);
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
out:
|
||||
if (inner_error) {
|
||||
g_propagate_error (error, inner_error);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
- if (allowed == MM_MODEM_MODE_NONE) {
|
||||
- inner_error = g_error_new (MM_CORE_ERROR, MM_CORE_ERROR_FAILED,
|
||||
- "Couldn't parse +URAT response: %s", response);
|
||||
- return FALSE;
|
||||
- }
|
||||
-
|
||||
*out_allowed = allowed;
|
||||
*out_preferred = preferred;
|
||||
return TRUE;
|
||||
--
|
||||
2.45.2
|
||||
|
@ -1,38 +0,0 @@
|
||||
From d550a24ffdae4492e9f9e18fdf294adcda28fb65 Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Thu, 23 May 2024 14:45:22 +0200
|
||||
Subject: [PATCH 02/11] ublox/helpers: fix propagation of +URAT response parse
|
||||
error
|
||||
|
||||
We have been constructing a GError too late, just leaking it instead of
|
||||
propagating.
|
||||
---
|
||||
src/plugins/ublox/mm-modem-helpers-ublox.c | 9 ++++-----
|
||||
1 file changed, 4 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/plugins/ublox/mm-modem-helpers-ublox.c b/src/plugins/ublox/mm-modem-helpers-ublox.c
|
||||
index 0fd1c5b0b..ffb1374de 100644
|
||||
--- a/src/plugins/ublox/mm-modem-helpers-ublox.c
|
||||
+++ b/src/plugins/ublox/mm-modem-helpers-ublox.c
|
||||
@@ -1813,14 +1813,13 @@ mm_ublox_parse_urat_read_response (const gchar *response,
|
||||
}
|
||||
|
||||
out:
|
||||
- if (inner_error) {
|
||||
- g_propagate_error (error, inner_error);
|
||||
- return FALSE;
|
||||
- }
|
||||
-
|
||||
if (allowed == MM_MODEM_MODE_NONE) {
|
||||
inner_error = g_error_new (MM_CORE_ERROR, MM_CORE_ERROR_FAILED,
|
||||
"Couldn't parse +URAT response: %s", response);
|
||||
+ }
|
||||
+
|
||||
+ if (inner_error) {
|
||||
+ g_propagate_error (error, inner_error);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
--
|
||||
2.45.2
|
||||
|
Loading…
Reference in new issue