From 3d8b165033c5842937a237e9e2ae265ca90aedb2 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 19 May 2021 09:06:35 +0200 Subject: [PATCH] fix coverity CID 344398 --- client/src/cmdflashmem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client/src/cmdflashmem.c b/client/src/cmdflashmem.c index fd701dd37..649809283 100644 --- a/client/src/cmdflashmem.c +++ b/client/src/cmdflashmem.c @@ -474,13 +474,13 @@ static int CmdFlashMemInfo(const char *Cmd) { // load private res = mbedtls_pk_parse_keyfile(&pkctx, path, NULL); + free(path); //res = mbedtls_pk_parse_public_keyfile(&pkctx, path); if (res == 0) { PrintAndLogEx(NORMAL, " ( " _GREEN_("ok") " )"); } else { PrintAndLogEx(NORMAL, " ( " _RED_("fail") " )"); mbedtls_pk_free(&pkctx); - free(path); return PM3_EFILE; } @@ -489,7 +489,6 @@ static int CmdFlashMemInfo(const char *Cmd) { PrintAndLogEx(FAILED, "failed to allocate rsa context memory"); return PM3_EMALLOC; } - free(path); got_private = true; } else {