mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
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:848b49b288("gallium: add renderonly library") CC: <mesa-stable@lists.freedesktop.org> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> (cherry picked from commitab51cd2f26)
This commit is contained in:
parent
cabca7185b
commit
63d75fbfe3
1 changed files with 2 additions and 0 deletions
|
|
@ -116,6 +116,8 @@ renderonly_create_kms_dumb_buffer_for_resource(struct pipe_resource *rsc,
|
|||
scanout->prime = screen->resource_from_handle(screen, rsc,
|
||||
&handle, PIPE_HANDLE_USAGE_READ_WRITE);
|
||||
|
||||
close(prime_fd);
|
||||
|
||||
if (!scanout->prime) {
|
||||
fprintf(stderr, "failed to create resource_from_handle: %s\n", strerror(errno));
|
||||
goto free_dumb;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue