* [PATCH] crypto/openssl: remove unneccessary null free checks
@ 2024-11-13 15:56 Stephen Hemminger
0 siblings, 0 replies; only message in thread
From: Stephen Hemminger @ 2024-11-13 15:56 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Kai Ji
The function EVP_PKEY_CTX_free allows NULL parameter
(similar to free()).
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/crypto/openssl/rte_openssl_pmd.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index b2442c7ebf..d2cf20c059 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -3244,14 +3244,11 @@ process_openssl_eddsa_op_evp(struct rte_crypto_op *cop,
err_eddsa:
OSSL_PARAM_BLD_free(iparam_bld);
- if (sctx)
- EVP_PKEY_CTX_free(sctx);
+ EVP_PKEY_CTX_free(sctx);
- if (cctx)
- EVP_PKEY_CTX_free(cctx);
+ EVP_PKEY_CTX_free(cctx);
- if (pkey)
- EVP_PKEY_free(pkey);
+ EVP_PKEY_free(pkey);
return ret;
}
--
2.45.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-11-13 15:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-13 15:56 [PATCH] crypto/openssl: remove unneccessary null free checks Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).