RE: [EXT] Re: [PATCH v2] crypto/openssl: fix memory leaks in asym ops

2023-11-03 Thread Gowrishankar Muthukrishnan
> 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.

RE: [PATCH v2] crypto/openssl: fix memory leaks in asym ops

2023-11-03 Thread Power, Ciara
> -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

RE: [PATCH v2] crypto/openssl: fix memory leaks in asym ops

2023-11-03 Thread Power, Ciara
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/openssl: fix memory leaks i

Re: [PATCH v2] crypto/openssl: fix memory leaks in asym ops

2023-11-02 Thread Stephen Hemminger
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