From 2401a0e27bc1c9f3b1d9b0c52943d16f04f37e21 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 11 Nov 2023 16:47:45 +0100 Subject: [PATCH] fix coverity 420050 --- client/src/fileutils.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/client/src/fileutils.c b/client/src/fileutils.c index 5f923e492..942dafdf0 100644 --- a/client/src/fileutils.c +++ b/client/src/fileutils.c @@ -2777,11 +2777,7 @@ int pm3_load_dump(const char *fn, void **pdump, size_t *dumplen, size_t maxdumpl nfc_df_e foo = detect_nfc_dump_format(fn, true); if (foo == NFC_DF_MFC || foo == NFC_DF_MFU || foo == NFC_DF_PICOPASS) { - if (foo == NFC_DF_MFC) { - *pdump = calloc(maxdumplen, sizeof(uint8_t)); - } else { - *pdump = calloc(maxdumplen, sizeof(uint8_t)); - } + *pdump = calloc(maxdumplen, sizeof(uint8_t)); if (*pdump == NULL) { PrintAndLogEx(WARNING, "Fail, cannot allocate memory"); return PM3_EMALLOC;