mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-11 22:20:37 +01:00
modesetting: fix shared pixmap dmabuf fd leakage
After the dmabuf fd exported by another screen is imported to a pixmap, the pixmap holds a reference for the buffer, thus the FD itself finished its job and needs to be closed to prevent a stale reference to the buffer. Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
This commit is contained in:
parent
b096785df4
commit
11a52e3095
1 changed files with 1 additions and 0 deletions
|
|
@ -1877,6 +1877,7 @@ msSetSharedPixmapBacking(PixmapPtr ppix, void *fd_handle)
|
|||
ppix->devKind,
|
||||
ppix->drawable.depth,
|
||||
ppix->drawable.bitsPerPixel);
|
||||
close(ihandle);
|
||||
} else {
|
||||
int size = ppix->devKind * ppix->drawable.height;
|
||||
ret = drmmode_SetSlaveBO(ppix, &ms->drmmode, ihandle, ppix->devKind, size);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue