mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 08:04:30 +00: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's avatarIcenowy Zheng <uwu@icenowy.me>
This commit is contained in:
committed by
Enrico Weigelt
parent
6be7fe9d12
commit
03fa63778b
@@ -1798,6 +1798,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);
|
||||
|
||||
Reference in New Issue
Block a user