mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 14:34:29 +00:00
modesetting: Only close the dmabuf fd if it isn't -1
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
This commit is contained in:
committed by
Enrico Weigelt
parent
03fa63778b
commit
c01c4e7c72
@@ -1798,15 +1798,15 @@ msSetSharedPixmapBacking(PixmapPtr ppix, void *fd_handle)
|
||||
ppix->devKind,
|
||||
ppix->drawable.depth,
|
||||
ppix->drawable.bitsPerPixel);
|
||||
close(ihandle);
|
||||
if (ihandle != -1) {
|
||||
close(ihandle);
|
||||
}
|
||||
} else {
|
||||
int size = ppix->devKind * ppix->drawable.height;
|
||||
ret = drmmode_SetSlaveBO(ppix, &ms->drmmode, ihandle, ppix->devKind, size);
|
||||
}
|
||||
if (ret == FALSE)
|
||||
return ret;
|
||||
|
||||
return TRUE;
|
||||
return ret;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user