int cpp;
image = intel_allocate_image(format, loaderPrivate);
+ if (image == NULL)
+ return NULL;
+
if (image->format == MESA_FORMAT_NONE)
cpp = 1;
else
}
image = intel_allocate_image(format, loaderPrivate);
+ if (image == NULL)
+ return NULL;
+
cpp = _mesa_get_format_bytes(image->format);
image->region =
intel_region_alloc(intelScreen, tiling, cpp, width, height, true);
stride = parent->strides[index];
image = intel_allocate_image(dri_format, loaderPrivate);
+ if (image == NULL)
+ return NULL;
+
if (offset + height * stride > parent->region->bo->size) {
_mesa_warning(NULL, "intel_create_sub_image: subimage out of bounds");
free(image);