ublox/helpers: fix propagation of +URAT response parse error

We have been constructing a GError too late, just leaking it instead of
propagating.
This commit is contained in:
Lubomir Rintel
2024-05-31 10:39:59 +00:00
committed by Aleksander Morgado
parent 7dfd59157e
commit 39a90fc39a
+4 -5
View File
@@ -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;
}