mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader: Do not check for NULL in vkd3d_shader_free_scan_descriptor_info().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9a0692978e
commit
6c10b52804
@ -884,14 +884,16 @@ int vkd3d_shader_scan(const struct vkd3d_shader_compile_info *compile_info, char
|
||||
if (instruction.handler_idx == VKD3DSIH_INVALID)
|
||||
{
|
||||
WARN("Encountered unrecognized or invalid instruction.\n");
|
||||
vkd3d_shader_free_scan_descriptor_info(scan_descriptor_info);
|
||||
if (scan_descriptor_info)
|
||||
vkd3d_shader_free_scan_descriptor_info(scan_descriptor_info);
|
||||
ret = VKD3D_ERROR_INVALID_SHADER;
|
||||
goto done;
|
||||
}
|
||||
|
||||
if ((ret = vkd3d_shader_scan_instruction(&context, &instruction)) < 0)
|
||||
{
|
||||
vkd3d_shader_free_scan_descriptor_info(scan_descriptor_info);
|
||||
if (scan_descriptor_info)
|
||||
vkd3d_shader_free_scan_descriptor_info(scan_descriptor_info);
|
||||
goto done;
|
||||
}
|
||||
++message_context->line;
|
||||
@ -910,9 +912,6 @@ done:
|
||||
|
||||
void vkd3d_shader_free_scan_descriptor_info(struct vkd3d_shader_scan_descriptor_info *scan_descriptor_info)
|
||||
{
|
||||
if (!scan_descriptor_info)
|
||||
return;
|
||||
|
||||
vkd3d_free(scan_descriptor_info->descriptors);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user