From 00386c76bfc23777d6a3b3f6061102d66c75b02e Mon Sep 17 00:00:00 2001 From: Colton Willey Date: Tue, 10 Dec 2024 09:43:03 -0800 Subject: [PATCH] No redundant NULL check on free --- wolfcrypt/src/wc_pkcs11.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/wolfcrypt/src/wc_pkcs11.c b/wolfcrypt/src/wc_pkcs11.c index c49682331c..b3df75c42e 100644 --- a/wolfcrypt/src/wc_pkcs11.c +++ b/wolfcrypt/src/wc_pkcs11.c @@ -4050,9 +4050,7 @@ static int Pkcs11GetCert(Pkcs11Session* session, wc_CryptoInfo* info) { certData = NULL; exit: - if (certData != NULL) { - XFREE(certData, info->cert.heap, DYNAMIC_TYPE_CERT); - } + XFREE(certData, info->cert.heap, DYNAMIC_TYPE_CERT); return ret; }