Allocate the exact amount of memory for VA image palettes on 64-bit
systems. No more.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
dri_bo_reference(obj_image->bo);
if (image->num_palette_entries > 0 && image->entry_bytes > 0) {
dri_bo_reference(obj_image->bo);
if (image->num_palette_entries > 0 && image->entry_bytes > 0) {
- obj_image->palette = malloc(image->num_palette_entries * sizeof(obj_image->palette));
+ obj_image->palette = malloc(image->num_palette_entries * sizeof(*obj_image->palette));
if (!obj_image->palette)
goto error;
}
if (!obj_image->palette)
goto error;
}