summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2016-01-15 20:02:04 +0100
committerAleksander Morgado <aleksander@aleksander.es>2016-01-16 17:59:49 +0100
commit884d7bee1b25697a4fa378f43801e0cafd0a8c5e (patch)
tree5a7fbca224c939e25dc08684cca81fa61656fc38
parent6d4597694268f7feab339aa5b903d9b6c6bda829 (diff)
downloadModemManager-884d7bee1b25697a4fa378f43801e0cafd0a8c5e.tar.gz
broadband-modem,time: make sure that error is set when operation fails
-rw-r--r--src/mm-broadband-modem.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c
index 6ebd6ae11..b3bfae0e6 100644
--- a/src/mm-broadband-modem.c
+++ b/src/mm-broadband-modem.c
@@ -7874,8 +7874,10 @@ modem_time_load_network_time_finish (MMIfaceModemTime *self,
gchar *result = NULL;
response = mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, error);
- if (response)
- mm_parse_cclk_response (response, &result, NULL, error);
+ if (!response)
+ return NULL;
+ if (!mm_parse_cclk_response (response, &result, NULL, error))
+ return NULL;
return result;
}
@@ -7903,9 +7905,11 @@ modem_time_load_network_timezone_finish (MMIfaceModemTime *self,
const gchar *response;
MMNetworkTimezone *tz = NULL;
- response = mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, NULL);
- if (response)
- mm_parse_cclk_response (response, NULL, &tz, error);
+ response = mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, error);
+ if (!response)
+ return NULL;
+ if (!mm_parse_cclk_response (response, NULL, &tz, error))
+ return NULL;
return tz;
}