diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2024-05-23 14:45:22 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksandermj@chromium.org> | 2024-05-31 10:39:59 +0000 |
commit | 39a90fc39a2e723dea7e6895ace9c9b157b2a3a1 (patch) | |
tree | dbc5adaaeb4b692742bb8f31d236ebf91619cbf3 /src | |
parent | 7dfd59157e80bb2b761c926d3a295254e05441d2 (diff) |
ublox/helpers: fix propagation of +URAT response parse error
We have been constructing a GError too late, just leaking it instead of
propagating.
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/ublox/mm-modem-helpers-ublox.c | 9 |
1 files 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 0fd1c5b0..ffb1374d 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; } |