From c0f3b5bceff8223b748c0ade717e3d5a2a072221 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 30 Sep 2024 17:49:06 +0200 Subject: [PATCH] Xext: shm: use dixDestroyPixmap() instead of direct driver call Direct calls to ScreenRec->DestroyPixmap() blocks cleaning up the wrapping jungle, so use the proper dix function instead. See: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1754 Signed-off-by: Enrico Weigelt, metux IT consult Part-of: --- Xext/shm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Xext/shm.c b/Xext/shm.c index b066d05ea..a82fbcd39 100644 --- a/Xext/shm.c +++ b/Xext/shm.c @@ -511,7 +511,7 @@ doShmPutImage(DrawablePtr dst, GCPtr pGC, else (void) (*pGC->ops->CopyArea) (&pPixmap->drawable, dst, pGC, 0, 0, sw, sh, dx, dy); - (*pPixmap->drawable.pScreen->DestroyPixmap) (pPixmap); + dixDestroyPixmap(pPixmap, 0); } } @@ -1001,7 +1001,7 @@ ProcPanoramiXShmCreatePixmap(ClientPtr client) result = XaceHookResourceAccess(client, stuff->pid, X11_RESTYPE_PIXMAP, pMap, X11_RESTYPE_NONE, NULL, DixCreateAccess); if (result != Success) { - pDraw->pScreen->DestroyPixmap(pMap); + dixDestroyPixmap(pMap, 0); break; } dixSetPrivate(&pMap->devPrivates, shmPixmapPrivateKey, shmdesc); @@ -1045,7 +1045,7 @@ fbShmCreatePixmap(ScreenPtr pScreen, BitsPerPixel(depth), PixmapBytePad(width, depth), (void *) addr)) { - (*pScreen->DestroyPixmap) (pPixmap); + dixDestroyPixmap(pPixmap, 0); return NullPixmap; } return pPixmap; @@ -1116,7 +1116,7 @@ ProcShmCreatePixmap(ClientPtr client) rc = XaceHookResourceAccess(client, stuff->pid, X11_RESTYPE_PIXMAP, pMap, X11_RESTYPE_NONE, NULL, DixCreateAccess); if (rc != Success) { - pDraw->pScreen->DestroyPixmap(pMap); + dixDestroyPixmap(pMap, 0); return rc; } dixSetPrivate(&pMap->devPrivates, shmPixmapPrivateKey, shmdesc);