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)
committerQiang Yu <yuq825@gmail.com>
Fri, 19 Jan 2024 02:12:01 +0000 (10:12 +0800)
commit04ae3eb470e52a3c41babe85ff8cee195e4dcbea
tree508f5b33c5e8b57453cc4799222e9c79eb29ea6a
parent2e722c868b3a056eb6a2c00cfc0e395cf996290c
drm/lima: fix a memleak in lima_heap_alloc

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
drivers/gpu/drm/lima/lima_gem.c