> All these checks for null are unnecessary:
>
>EVP_PKEY_free() decrements the reference count of key and, if the
> reference count is zero,
>frees it up. If key is NULL, nothing is done.
>
>
> Let me add those functions to cocci nullfree script as well.
Ack.
> -Original Message-
> From: Power, Ciara
> Sent: Friday, November 3, 2023 10:18 AM
> To: Gowrishankar Muthukrishnan ;
> dev@dpdk.org
> Cc: ano...@marvell.com; Akhil Goyal ; Ji, Kai
>
> Subject: RE: [PATCH v2] crypto/openssl: fix memory leaks in asym
Hi Gowrishankar,
> -Original Message-
> From: Gowrishankar Muthukrishnan
> Sent: Thursday, November 2, 2023 10:04 AM
> To: dev@dpdk.org
> Cc: ano...@marvell.com; Akhil Goyal ; Ji, Kai
> ; Power, Ciara ; Gowrishankar
> Muthukrishnan
> Subject: [PATCH v2] crypto/o
On Thu, 2 Nov 2023 14:08:31 +0530
Gowrishankar Muthukrishnan wrote:
> + if (pub_key)
> + BN_free(pub_key);
> + if (pkey)
> + EVP_PKEY_free(pkey);
>
All these checks for null are unnecessary:
EVP_PKEY_free() decrements the reference count of key and, if t
Fix memory leaks in Asymmetric ops, as reported by valgrind.
Signed-off-by: Gowrishankar Muthukrishnan
---
v2:
- added more fixes.
---
drivers/crypto/openssl/rte_openssl_pmd.c | 38 ++--
drivers/crypto/openssl/rte_openssl_pmd_ops.c | 15 ++--
2 files changed, 39 insertio
5 matches
Mail list logo