From 084a8161d4ded1056ab71ba50b412030a4732e80 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Tue, 28 Apr 2020 18:24:52 +0200 Subject: [PATCH] coverity fix: 279106 --- client/src/cmdhfmfdes.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/client/src/cmdhfmfdes.c b/client/src/cmdhfmfdes.c index 65b02b5f8..11f93ec95 100644 --- a/client/src/cmdhfmfdes.c +++ b/client/src/cmdhfmfdes.c @@ -3081,13 +3081,25 @@ static void DecodeAccessRights(uint16_t accrights) { if (car == NULL) return; char *rwa = DecodeAccessValue(read_write_access); - if (rwa == NULL) return; + if (rwa == NULL) { + free(car); + return; + } char *wa = DecodeAccessValue(write_access); - if (wa == NULL) return; + if (wa == NULL) { + free(car); + free(rwa); + return; + } char *ra = DecodeAccessValue(read_access); - if (ra == NULL) return; + if (ra == NULL) { + free(car); + free(rwa); + free(wa); + return; + } PrintAndLogEx(INFO, " Access Rights: 0x%04X - Change %s - RW %s - W %s - R %s", accrights, car, rwa, wa, ra); free(car);