From e02abb054bc8be9e93efde055191a7451ba9f8f5 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Tue, 27 Jan 2015 18:18:21 +0100 Subject: qmicli,wda: error out early if parsing the --set-data-format value fails --- src/qmicli/qmicli-wda.c | 4 ++++ 1 file changed, 4 insertions(+) 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, -- cgit v1.1