Commit 4c72effa authored by Ben Skeggs's avatar Ben Skeggs Committed by Greg Kroah-Hartman
Browse files

UPSTREAM: drm/nouveau/gsp: fix potential leak of memory used during acpi init



[ Upstream commit d133036a ]

If any of the ACPI calls fail, memory allocated for the input buffer
would be leaked.  Fix failure paths to free allocated memory.

Also add checks to ensure the allocations succeeded in the first place.

Reported-by: default avatarDanilo Krummrich <dakr@kernel.org>
Fixes: 176fdcbd ("drm/nouveau/gsp/r535: add support for booting GSP-RM")
Change-Id: I4e09c7560e05c1dd7da6e102b4ec914aac2f8ac5
Signed-off-by: default avatarBen Skeggs <bskeggs@nvidia.com>
Signed-off-by: default avatarDanilo Krummrich <dakr@kernel.org>
Link: https://lore.kernel.org/r/20250617040036.2932-1-bskeggs@nvidia.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
(cherry picked from commit fa7e9a15)
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 48df5835
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment