raw/cnxk_gpio: fix resource leak
PATCH 1/1 raw/cnxk_gpio: fix resource leak
Fix resource leak.
Coverity issue: 405118
Fixes ef2a3f3b4c9e ("raw/cnxk_gpio: support multi-process")
Signed-off-by Tomasz Duszynski <[email protected]>
--- drivers/raw/cnxk_gpio/cnxk_gpio.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/raw/cnxk_gpio/cnxk_gpio.c +4 -2
@@ -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 );
Signature · 1 line
2.34.1
Jerin Jacob
AppliedQuoted 7 lines · Tomasz Duszynski
Fix resource leak.
Coverity issue: 405118
Fixes ef2a3f3b4c9e ("raw/cnxk_gpio: support multi-process")Signed-off-by Tomasz Duszynski <[email protected]>
Applied to dpdk-next-net-mrvl/for-next-net. Thanks