tu: fix invalid free on alloc failure

this is not an allocated pointer

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18230>
(cherry picked from commit 1e7a131fd1)
This commit is contained in:
Mike Blumenkrantz 2022-08-24 08:53:31 -04:00 committed by Dylan Baker
parent 2f9757373e
commit f7a3632d65
2 changed files with 1 additions and 2 deletions

View file

@ -11200,7 +11200,7 @@
"description": "tu: fix invalid free on alloc failure",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

View file

@ -130,7 +130,6 @@ tu_cs_add_bo(struct tu_cs *cs, uint32_t size)
tu_bo_init_new(cs->device, &new_bo, size * sizeof(uint32_t),
TU_BO_ALLOC_GPU_READ_ONLY | TU_BO_ALLOC_ALLOW_DUMP);
if (result != VK_SUCCESS) {
free(new_bo);
return result;
}