summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico Weigelt, metux IT consult <info@metux.net>2024-10-03 11:53:06 +0200
committerMarge Bot <emma+marge@anholt.net>2024-10-10 20:27:11 +0000
commit9323ba6feddb8551d6fb73bee078aaa75fc65e5f (patch)
tree85cffc7cd294b001d8ea166a44b393c61ba6ec63
parent33a42501574deaf220e14bf8cff82fa001e5161f (diff)
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 <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1710>
-rw-r--r--hw/xwin/winmultiwindowwindow.c4
1 files changed, 1 insertions, 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;
}