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 <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5131>
This commit is contained in:
parent
57a4837f6b
commit
a3045cbc97
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue