aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2020-05-20 20:04:34 +0200
committerMarge Bot <[email protected]>2020-05-21 08:09:18 +0000
commita3045cbc97d7417e3036ba8f1f6f5189c1254407 (patch)
treeeefd25e850e0590a8119bda274adb419e5228a5d /src
parent57a4837f6be2b0c8b6a9174d0a385c7f0bfb00e1 (diff)
radv/winsys: remove useless free in radv_amdgpu_create_bo_list()
free(NULL) is fine but let's remove it. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3008 Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5131>
Diffstat (limited to 'src')
-rw-r--r--src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c
index de6bd6546ed..00927413ee2 100644
--- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c
+++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c
@@ -731,10 +731,8 @@ static int radv_amdgpu_create_bo_list(struct radv_amdgpu_winsys *ws,
return 0;
}
struct drm_amdgpu_bo_list_entry *handles = malloc(sizeof(struct drm_amdgpu_bo_list_entry) * total_buffer_count);
- if (!handles) {
- free(handles);
+ if (!handles)
return -ENOMEM;
- }
for (unsigned i = 0; i < num_extra_bo; i++) {
handles[i].bo_handle = extra_bo_array[i]->bo_handle;