[PATCH 1/3] wined3d: Move the uploads array in wined3d_deferred_context_record_command_list().

Henri Verbeet hverbeet at gmail.com
Thu Jul 8 08:31:12 CDT 2021


On Wed, 7 Jul 2021 at 18:40, Zebediah Figura <zfigura at codeweavers.com> wrote:
> @@ -3725,4 +3720,14 @@ HRESULT CDECL wined3d_deferred_context_record_command_list(struct wined3d_device
> +out_free_uploads:
> +    heap_free(object->uploads);
> +out_free_resources:
> +    heap_free(object->resources);
> +out_free_data:
> +    heap_free(object->data);
> +out_free_list:
> +    heap_free(object);
> +    return E_OUTOFMEMORY;
>  }
The separate labels are somewhat superfluous here. Because "object" is
allocated with heap_alloc_zero(), when e.g. the "object->data"
allocation were to fail, "object->resources" and "object->uploads"
would be NULL, and there should be no issue calling heap_free() on
them.



More information about the wine-devel mailing list