shared-qmi: fix a leak in error handling path

str needs to be freed in pds_get_agps_config_ready().
This commit is contained in:
Lubomir Rintel
2024-05-31 10:46:30 +00:00
committed by Aleksander Morgado
parent 5f6b095360
commit a42d12f660
+3 -2
View File
@@ -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);
}