Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b3ad6a3d authored by Qiushi Wu's avatar Qiushi Wu Committed by Greg Kroah-Hartman
Browse files

agp/intel: Fix a memory leak on module initialisation failure



[ Upstream commit b975abbd382fe442713a4c233549abb90e57c22b ]

In intel_gtt_setup_scratch_page(), pointer "page" is not released if
pci_dma_mapping_error() return an error, leading to a memory leak on
module initialisation failure.  Simply fix this issue by freeing "page"
before return.

Fixes: 0e87d2b0 ("intel-gtt: initialize our own scratch page")
Signed-off-by: default avatarQiushi Wu <wu000273@umn.edu>
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20200522083451.7448-1-chris@chris-wilson.co.uk


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 57645ea3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment