mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
hk: don't leak GS subparts in an error path
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
This commit is contained in:
parent
568f0a81c6
commit
6f3c1c909b
1 changed files with 8 additions and 1 deletions
|
|
@ -1028,7 +1028,14 @@ hk_compile_shader(struct hk_device *dev, struct vk_shader_compile_info *info,
|
|||
variants[v].out, sw_stage, true, NULL);
|
||||
if (result != VK_SUCCESS) {
|
||||
hk_api_shader_destroy(&dev->vk, &obj->vk, pAllocator);
|
||||
ralloc_free(nir);
|
||||
if (clone != nir) {
|
||||
ralloc_free(nir);
|
||||
}
|
||||
|
||||
ralloc_free(clone);
|
||||
ralloc_free(pre_gs);
|
||||
ralloc_free(count);
|
||||
ralloc_free(rast);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue