diff options
author | Bas Nieuwenhuizen <[email protected]> | 2018-01-21 22:01:49 +0100 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2018-01-22 00:07:32 +0100 |
commit | fb0992e967e7f56604e1f5db8579ae6c2b8d0f2a (patch) | |
tree | a44180f788a541aa0596cd2101950c215d0f159b | |
parent | 2c802ca66c480a1038e1fe52350e30a27658e78a (diff) |
radv: Fix bufimage failure deallocation.
The inidividual init parts don't clean up their own stuff on failure.
CC: <[email protected]>
Reviewed-by: Dave Airlie <[email protected]>
-rw-r--r-- | src/amd/vulkan/radv_meta_bufimage.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/amd/vulkan/radv_meta_bufimage.c b/src/amd/vulkan/radv_meta_bufimage.c index 5bcc1e62dba..adf610a933e 100644 --- a/src/amd/vulkan/radv_meta_bufimage.c +++ b/src/amd/vulkan/radv_meta_bufimage.c @@ -901,21 +901,23 @@ radv_device_init_meta_bufimage_state(struct radv_device *device) result = radv_device_init_meta_itob_state(device); if (result != VK_SUCCESS) - return result; + goto fail_itob; result = radv_device_init_meta_btoi_state(device); if (result != VK_SUCCESS) - goto fail_itob; + goto fail_btoi; result = radv_device_init_meta_itoi_state(device); if (result != VK_SUCCESS) - goto fail_btoi; + goto fail_itoi; result = radv_device_init_meta_cleari_state(device); if (result != VK_SUCCESS) - goto fail_itoi; + goto fail_cleari; return VK_SUCCESS; +fail_cleari: + radv_device_finish_meta_cleari_state(device); fail_itoi: radv_device_finish_meta_itoi_state(device); fail_btoi: |