radeon_bo_destroy() will want to read the list field. Without this patch,
we'd end up evaluating the list pointers before they have been properly
set up when we destroyed the newly created bo if it cannot be mapped.
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
bo->handle = handle;
pipe_reference_init(&bo->reference, 1);
bo->alignment = alignment;
+ LIST_INITHEAD(&bo->fencedlist);
if (handle) {
struct drm_gem_open open_arg;
if (ptr) {
memcpy(bo->data, ptr, size);
}
- LIST_INITHEAD(&bo->fencedlist);
return bo;
}