fix coverity 290272

This commit is contained in:
iceman1001 2020-06-02 11:06:24 +02:00
parent c81f0c7d0f
commit d8ef01b69d

View file

@ -427,6 +427,7 @@ static int CmdEMVAC(const char *Cmd) {
if (termDecision == 0xff) { if (termDecision == 0xff) {
PrintAndLogEx(ERR, "ERROR: can't find terminal decision '%s'", arg_get_str(3)->sval[0]); PrintAndLogEx(ERR, "ERROR: can't find terminal decision '%s'", arg_get_str(3)->sval[0]);
CLIParserFree(ctx);
return PM3_EINVARG; return PM3_EINVARG;
} }
} else { } else {
@ -438,9 +439,11 @@ static int CmdEMVAC(const char *Cmd) {
bool dataMakeFromCDOL = arg_get_lit(5); bool dataMakeFromCDOL = arg_get_lit(5);
bool APDULogging = arg_get_lit(6); bool APDULogging = arg_get_lit(6);
bool decodeTLV = arg_get_lit(7); bool decodeTLV = arg_get_lit(7);
EMVCommandChannel channel = ECC_CONTACTLESS; EMVCommandChannel channel = ECC_CONTACTLESS;
if (arg_get_lit(8)) if (arg_get_lit(8))
channel = ECC_CONTACT; channel = ECC_CONTACT;
PrintChannel(channel); PrintChannel(channel);
CLIGetHexWithReturn(ctx, 9, data, &datalen); CLIGetHexWithReturn(ctx, 9, data, &datalen);
CLIParserFree(ctx); CLIParserFree(ctx);