diff options
author | Grazvydas Ignotas <[email protected]> | 2017-05-02 22:46:06 +0300 |
---|---|---|
committer | Grazvydas Ignotas <[email protected]> | 2017-05-10 01:13:44 +0300 |
commit | 45ccb661d8b2aba00f1bdc0d3de4efe5b2a4a9f9 (patch) | |
tree | efe6f732531acb3233fc8ac670481347af487b1c /src/amd/vulkan/radv_meta_blit.c | |
parent | 0ef302638f2883789a3b39c2b6cfd20814efa0bb (diff) |
radv: always free nir shaders from modules on stack
valgrind reports them as leaked, and I could not find anything making a
copy of the nir pointer. Also, radv_device_init_meta_blit_color() is
already freeing them unconditionally like this.
Signed-off-by: Grazvydas Ignotas <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_meta_blit.c')
-rw-r--r-- | src/amd/vulkan/radv_meta_blit.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/amd/vulkan/radv_meta_blit.c b/src/amd/vulkan/radv_meta_blit.c index 439309903d0..f63fa6795c0 100644 --- a/src/amd/vulkan/radv_meta_blit.c +++ b/src/amd/vulkan/radv_meta_blit.c @@ -1259,12 +1259,10 @@ radv_device_init_meta_blit_state(struct radv_device *device) goto fail; result = radv_device_init_meta_blit_stencil(device, &vs); - if (result != VK_SUCCESS) - goto fail; - return VK_SUCCESS; fail: ralloc_free(vs.nir); - radv_device_finish_meta_blit_state(device); + if (result != VK_SUCCESS) + radv_device_finish_meta_blit_state(device); return result; } |