You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
830 B
31 lines
830 B
From 4a3542b2d00c4104e9735af9eea906c703faed20 Mon Sep 17 00:00:00 2001
|
|
From: Lubomir Rintel <lkundrak@v3.sk>
|
|
Date: Thu, 23 May 2024 14:56:40 +0200
|
|
Subject: [PATCH 04/11] shared-qmi: fix a leak in error handling path
|
|
|
|
str needs to be freed in pds_get_agps_config_ready().
|
|
---
|
|
src/mm-shared-qmi.c | 5 +++--
|
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/mm-shared-qmi.c b/src/mm-shared-qmi.c
|
|
index 923c6b51a..789b92a4d 100644
|
|
--- a/src/mm-shared-qmi.c
|
|
+++ b/src/mm-shared-qmi.c
|
|
@@ -4795,9 +4795,10 @@ pds_get_agps_config_ready (QmiClientPds *client,
|
|
str = g_strdup ("");
|
|
|
|
out:
|
|
- if (error)
|
|
+ if (error) {
|
|
+ g_free (str);
|
|
g_task_return_error (task, error);
|
|
- else {
|
|
+ } else {
|
|
g_assert (str);
|
|
g_task_return_pointer (task, str, g_free);
|
|
}
|
|
--
|
|
2.45.2
|
|
|