DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] raw/cnxk_gpio: fix resource leak
@ 2023-11-07  9:59 Tomasz Duszynski
  2023-11-07 13:52 ` Jerin Jacob
  0 siblings, 1 reply; 2+ messages in thread
From: Tomasz Duszynski @ 2023-11-07  9:59 UTC (permalink / raw)
  To: dev, Jakub Palider, Tomasz Duszynski; +Cc: jerinj

Fix resource leak.

Coverity issue: 405118
Fixes: ef2a3f3b4c9e ("raw/cnxk_gpio: support multi-process")

Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
---
 drivers/raw/cnxk_gpio/cnxk_gpio.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/raw/cnxk_gpio/cnxk_gpio.c b/drivers/raw/cnxk_gpio/cnxk_gpio.c
index ebc914afcf..45e2ab5e00 100644
--- a/drivers/raw/cnxk_gpio/cnxk_gpio.c
+++ b/drivers/raw/cnxk_gpio/cnxk_gpio.c
@@ -171,8 +171,10 @@ cnxk_gpio_parse_store_args(struct cnxk_gpio_params **params, const char *args)
 		len += strlen(allowlist) + 1;
 
 	*params = cnxk_gpio_params_reserve(len);
-	if (!(*params))
-		return -ENOMEM;
+	if (!(*params)) {
+		ret = -ENOMEM;
+		goto out;
+	}
 
 	strlcpy((*params)->allowlist, allowlist, strlen(allowlist) + 1);
 
-- 
2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] raw/cnxk_gpio: fix resource leak
  2023-11-07  9:59 [PATCH] raw/cnxk_gpio: fix resource leak Tomasz Duszynski
@ 2023-11-07 13:52 ` Jerin Jacob
  0 siblings, 0 replies; 2+ messages in thread
From: Jerin Jacob @ 2023-11-07 13:52 UTC (permalink / raw)
  To: Tomasz Duszynski; +Cc: dev, Jakub Palider, jerinj

On Tue, Nov 7, 2023 at 3:30 PM Tomasz Duszynski <tduszynski@marvell.com> wrote:
>
> Fix resource leak.
>
> Coverity issue: 405118
> Fixes: ef2a3f3b4c9e ("raw/cnxk_gpio: support multi-process")
>
> Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>

Applied to dpdk-next-net-mrvl/for-next-net. Thanks

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-11-07 13:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-07  9:59 [PATCH] raw/cnxk_gpio: fix resource leak Tomasz Duszynski
2023-11-07 13:52 ` Jerin Jacob

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).