All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/nouveau/secboot/acr: fix memory leak
@ 2018-07-24 13:27 Gustavo A. R. Silva
  2018-08-02 19:51 ` Gustavo A. R. Silva
  0 siblings, 1 reply; 7+ messages in thread
From: Gustavo A. R. Silva @ 2018-07-24 13:27 UTC (permalink / raw)
  To: Kees Cook, Ben Skeggs, David Airlie
  Cc: dri-devel, nouveau, linux-kernel, Gustavo A. R. Silva

In case memory resources for *bl_desc* were allocated, release
them before return.

Addresses-Coverity-ID: 1472021 ("Resource leak")
Fixes: 0d466901552a ("drm/nouveau/secboot/acr: Remove VLA usage")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c
index d02e183..5c14d6a 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c
@@ -801,6 +801,7 @@ acr_r352_load(struct nvkm_acr *_acr, struct nvkm_falcon *falcon,
 		bl = acr->hsbl_unload_blob;
 	} else {
 		nvkm_error(_acr->subdev, "invalid secure boot blob!\n");
+		kfree(bl_desc);
 		return -EINVAL;
 	}
 
-- 
2.7.4


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

end of thread, other threads:[~2018-09-14  7:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-24 13:27 [PATCH] drm/nouveau/secboot/acr: fix memory leak Gustavo A. R. Silva
2018-08-02 19:51 ` Gustavo A. R. Silva
2018-09-08  3:02   ` John Hubbard
2018-09-08  3:02     ` John Hubbard
2018-09-13 21:35     ` Kees Cook
2018-09-13 21:35       ` Kees Cook
2018-09-14  7:26       ` [Nouveau] " Ben Skeggs

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.