From 7dc0dff26e7e723ab069e8b43f3f7573b792898e Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 3 Oct 2024 11:53:06 +0200 Subject: [PATCH] xwin: fix memleak on freeing pixmaps Xwin's DestroyPixmap proc just free()s the PixmapRec directly, w/o catering for devPrivate's, so leaving a memleak. The correct DIX function for this is FreePixmap(). Signed-off-by: Enrico Weigelt, metux IT consult Part-of: --- hw/xwin/winmultiwindowwindow.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/xwin/winmultiwindowwindow.c b/hw/xwin/winmultiwindowwindow.c index 4aca28930..24e226c51 100644 --- a/hw/xwin/winmultiwindowwindow.c +++ b/hw/xwin/winmultiwindowwindow.c @@ -1137,9 +1137,7 @@ winDestroyPixmapMultiwindow(PixmapPtr pPixmap) pPixmapPriv->pbmih = NULL; /* Free the pixmap memory */ - free(pPixmap); - pPixmap = NULL; - + FreePixmap(pPixmap); return TRUE; }