Loop end variable 'pinned' was set one too low.
DRM_ERROR("object bind and relocate failed %d\n", ret);
goto err;
}
- pinned = i;
+ pinned = i + 1;
}
/* Set the pending read domains for the batch buffer to COMMAND */
err:
if (object_list != NULL) {
for (i = 0; i < pinned; i++)
- i915_gem_object_unpin (object_list[i]);
+ i915_gem_object_unpin(object_list[i]);
+
for (i = 0; i < args->buffer_count; i++)
drm_gem_object_unreference(object_list[i]);
}