diff --git a/src/cli/cli_udp.cpp b/src/cli/cli_udp.cpp index c13fb1cbc..60f9ddba9 100644 --- a/src/cli/cli_udp.cpp +++ b/src/cli/cli_udp.cpp @@ -148,7 +148,8 @@ otError UdpExample::ProcessSend(int argc, char *argv[]) { if (strcmp(argv[curArg++], "-s") == 0) { - Interpreter::ParseUnsignedLong(argv[curArg++], autoGenMessageLength); + error = Interpreter::ParseUnsignedLong(argv[curArg++], autoGenMessageLength); + SuccessOrExit(error); } else {