* [PATCH] media: venus: helpers: Fix memory leak in venus_helper_alloc_dpb_bufs
@ 2021-12-05 19:04 José Expósito
2021-12-06 9:49 ` Kieran Bingham
0 siblings, 1 reply; 2+ messages in thread
From: José Expósito @ 2021-12-05 19:04 UTC (permalink / raw)
To: stanimir.varbanov
Cc: agross, bjorn.andersson, mchehab, linux-media, linux-arm-msm,
linux-kernel, José Expósito
Addresses-Coverity-ID: 1494120 ("Resource leaks")
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
drivers/media/platform/qcom/venus/helpers.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c
index 84c3a511ec31..344a42853898 100644
--- a/drivers/media/platform/qcom/venus/helpers.c
+++ b/drivers/media/platform/qcom/venus/helpers.c
@@ -197,6 +197,7 @@ int venus_helper_alloc_dpb_bufs(struct venus_inst *inst)
id = ida_alloc_min(&inst->dpb_ids, VB2_MAX_FRAME, GFP_KERNEL);
if (id < 0) {
+ kfree(buf);
ret = id;
goto fail;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] media: venus: helpers: Fix memory leak in venus_helper_alloc_dpb_bufs
2021-12-05 19:04 [PATCH] media: venus: helpers: Fix memory leak in venus_helper_alloc_dpb_bufs José Expósito
@ 2021-12-06 9:49 ` Kieran Bingham
0 siblings, 0 replies; 2+ messages in thread
From: Kieran Bingham @ 2021-12-06 9:49 UTC (permalink / raw)
To: José Expósito, stanimir.varbanov, Ameer Hamza
Cc: agross, bjorn.andersson, mchehab, linux-media, linux-arm-msm,
linux-kernel, José Expósito
Hi José
Quoting José Expósito (2021-12-05 19:04:15)
> Addresses-Coverity-ID: 1494120 ("Resource leaks")
This was also recently posted by Ameer in https://lore.kernel.org/all/20211204205504.6550-1-amhamza.mgc@gmail.com/
Regards
--
Kieran
> Signed-off-by: José Expósito <jose.exposito89@gmail.com>
> ---
> drivers/media/platform/qcom/venus/helpers.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c
> index 84c3a511ec31..344a42853898 100644
> --- a/drivers/media/platform/qcom/venus/helpers.c
> +++ b/drivers/media/platform/qcom/venus/helpers.c
> @@ -197,6 +197,7 @@ int venus_helper_alloc_dpb_bufs(struct venus_inst *inst)
>
> id = ida_alloc_min(&inst->dpb_ids, VB2_MAX_FRAME, GFP_KERNEL);
> if (id < 0) {
> + kfree(buf);
> ret = id;
> goto fail;
> }
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-06 9:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-05 19:04 [PATCH] media: venus: helpers: Fix memory leak in venus_helper_alloc_dpb_bufs José Expósito
2021-12-06 9:49 ` Kieran Bingham
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).