aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2015-01-27 18:18:21 +0100
committerAleksander Morgado <aleksander@aleksander.es>2015-01-27 18:18:21 +0100
commite02abb054bc8be9e93efde055191a7451ba9f8f5 (patch)
treed8b2d4459947b22a673753f048c0aa0cc8ad5b03
parent041c4b62e8a583af552e68e99390032e0a886866 (diff)
downloadexternal_libqmi-e02abb054bc8be9e93efde055191a7451ba9f8f5.zip
external_libqmi-e02abb054bc8be9e93efde055191a7451ba9f8f5.tar.gz
external_libqmi-e02abb054bc8be9e93efde055191a7451ba9f8f5.tar.bz2
qmicli,wda: error out early if parsing the --set-data-format value fails
-rw-r--r--src/qmicli/qmicli-wda.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qmicli/qmicli-wda.c b/src/qmicli/qmicli-wda.c
index fe74ce4..041cbd2 100644
--- a/src/qmicli/qmicli-wda.c
+++ b/src/qmicli/qmicli-wda.c
@@ -329,6 +329,10 @@ qmicli_wda_run (QmiDevice *device,
QmiMessageWdaSetDataFormatInput *input;
input = set_data_format_input_create (set_data_format_str);
+ if (!input) {
+ shutdown (FALSE);
+ return;
+ }
g_debug ("Asynchronously setting data format...");
qmi_client_wda_set_data_format (ctx->client,