Commit abbf0524 authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

d3drm: Suppress a use-after-free warning in d3drm_image_palettise (GCC).

parent 9a80befb
......@@ -153,7 +153,8 @@ static BOOL d3drm_image_palettise(D3DRMIMAGE *image, unsigned char *src_data,
image->green_mask = 0xff;
image->blue_mask = 0xff;
image->palette_size = colour_count;
if (!(image->palette = realloc(palette, colour_count * sizeof(*palette))))
image->palette = palette;
if ((palette = realloc(palette, colour_count * sizeof(*palette))))
image->palette = palette;
return TRUE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment