Skip to content

Commit 05dff1e

Browse files
GustavoARSilvagregkh
authored andcommitted
drm/nouveau/secboot/acr: fix memory leak
[ Upstream commit 74a07c0 ] In case memory resources for *bl_desc* were allocated, release them before return. Addresses-Coverity-ID: 1472021 ("Resource leak") Fixes: 0d46690 ("drm/nouveau/secboot/acr: Remove VLA usage") Signed-off-by: Gustavo A. R. Silva <[email protected]> Reviewed-by: John Hubbard <[email protected]> Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Ben Skeggs <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 784c2eb commit 05dff1e

File tree

1 file changed

+1
-0
lines changed
  • drivers/gpu/drm/nouveau/nvkm/subdev/secboot

1 file changed

+1
-0
lines changed

drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -801,6 +801,7 @@ acr_r352_load(struct nvkm_acr *_acr, struct nvkm_falcon *falcon,
801801
bl = acr->hsbl_unload_blob;
802802
} else {
803803
nvkm_error(_acr->subdev, "invalid secure boot blob!\n");
804+
kfree(bl_desc);
804805
return -EINVAL;
805806
}
806807

0 commit comments

Comments
 (0)