From 29a4a888a4062f7c961446b9a323fe9e52caea59 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Mon, 29 Jun 2020 10:32:35 +0200 Subject: [PATCH] fix coverity 290965 --- client/src/cmdhfmfdes.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/client/src/cmdhfmfdes.c b/client/src/cmdhfmfdes.c index d45275969..7b41eeebd 100644 --- a/client/src/cmdhfmfdes.c +++ b/client/src/cmdhfmfdes.c @@ -3216,24 +3216,20 @@ static int CmdHF14ADesFormatPICC(const char *Cmd) { "\n\thf mfdes formatpicc\n" "Make sure to authenticate picc before running this command.\n" ); - + CLIParserFree(ctx); sAPDU apdu = {0x90, MFDES_FORMAT_PICC, 0x00, 0x00, 0, NULL}; // 0xDF uint16_t sw = 0; uint32_t recvlen = 0; int res = send_desfire_cmd(&apdu, false, NULL, &recvlen, &sw, 0, true); if (res != PM3_SUCCESS) { PrintAndLogEx(WARNING, _RED_(" Can't format picc -> %s"), GetErrorString(res, &sw)); - DropField(); - return res; } else { PrintAndLogEx(INFO, "Card successfully reset"); - return PM3_SUCCESS; } DropField(); - return PM3_SUCCESS; + return res; } - static int CmdHF14ADesInfo(const char *Cmd) { (void)Cmd; // Cmd is not used so far DropField(); @@ -3372,7 +3368,6 @@ static int CmdHF14ADesInfo(const char *Cmd) { return PM3_SUCCESS; } - static void DecodeFileType(uint8_t filetype) { switch (filetype) { case 0x00: