]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/lima: fix a memleak in lima_heap_alloc
authorZhipeng Lu <alexious@zju.edu.cn>
Wed, 17 Jan 2024 07:13:28 +0000 (15:13 +0800)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:19:43 +0000 (18:19 -0400)
commit8e25c0ee5665e8a768b8e21445db1f86e9156eb7
tree00e07344ed394ac920457b34538174de9a81ef16
parentc5e834cf86fd8fc484466e255d177a50476403d9
drm/lima: fix a memleak in lima_heap_alloc

[ Upstream commit 04ae3eb470e52a3c41babe85ff8cee195e4dcbea ]

When lima_vm_map_bo fails, the resources need to be deallocated, or
there will be memleaks.

Fixes: 6aebc51d7aef ("drm/lima: support heap buffer creation")
Signed-off-by: Zhipeng Lu <alexious@zju.edu.cn>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240117071328.3811480-1-alexious@zju.edu.cn
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/lima/lima_gem.c