OSDN Git Service

radv: fix double free corruption in radv_alloc_memory()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 22 Jan 2020 07:40:11 +0000 (08:40 +0100)
committerDylan Baker <dylan@pnwbakers.com>
Tue, 28 Jan 2020 16:54:25 +0000 (08:54 -0800)
commitb967399ceab25911e9737262b0836c6908bcf1f0
tree069cb5024f31fd8aef809c674fa0f7cc4fc471ce
parent386b9c5e7ead64936da533164c9e8575dba26088
radv: fix double free corruption in radv_alloc_memory()

If the driver fails to allocate memory for some reasons, it shouldn't
free the 'mem' object twice.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2302
Fixes: 825ddfee599 ("radv: Handle device memory alloc failure with normal free.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3508>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3508>
(cherry picked from commit bd51538d285ad0ef488df60e24eaa08b9da20c28)
.pick_status.json
src/amd/vulkan/radv_device.c