Commit ab51cd2f authored by Philipp Zabel's avatar Philipp Zabel Committed by Christian Gmeiner

renderonly: close transfer prime_fd

prime_fd is only used to transfer the scanout buffer to the GPU inside
renderonly_create_kms_dumb_buffer_for_resource. It should be closed
immediately to avoid leaking the DMA-BUF file handle.

Fixes: 848b49b2 ("gallium: add renderonly library")
CC: <>
Signed-off-by: Philipp Zabel's avatarPhilipp Zabel <>
Reviewed-by: Emil Velikov's avatarEmil Velikov <>
Reviewed-by: Christian Gmeiner's avatarChristian Gmeiner <>
parent 09034aab
......@@ -116,6 +116,8 @@ renderonly_create_kms_dumb_buffer_for_resource(struct pipe_resource *rsc,
scanout->prime = screen->resource_from_handle(screen, rsc,
if (!scanout->prime) {
fprintf(stderr, "failed to create resource_from_handle: %s\n", strerror(errno));
goto free_dumb;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment