Fix the size to malloc() submit/upstream/20130321.072122
authorXiang, Haihao <haihao.xiang@intel.com>
Fri, 15 Mar 2013 07:39:35 +0000 (15:39 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Fri, 15 Mar 2013 07:45:28 +0000 (15:45 +0800)
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
src/i965_drv_video.c

index ea124e1..380e4de 100755 (executable)
@@ -2783,7 +2783,7 @@ VAStatus i965_DeriveImage(VADriverContextP ctx,
     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) {
             va_status = VA_STATUS_ERROR_ALLOCATION_FAILED;
             goto error;