fix memory leak (#613)

This commit is contained in:
xMeM 2024-04-24 20:31:11 +08:00 committed by GitHub
parent a6f6a45624
commit 5489f7c872
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -408,7 +408,7 @@ lorieDestroyPixmap(PixmapPtr pPixmap) {
ScreenPtr pScreen = pPixmap->drawable.pScreen;
lorieScrPriv(pScreen);
if (pPixmap->refcnt == 1 && !pPixmap->drawable.width && !pPixmap->drawable.height) {
if (pPixmap->refcnt == 1 && pPixmap->drawable.width && pPixmap->drawable.height) {
ptr = dixLookupPrivate(&pPixmap->devPrivates, &lorieMmappedPixPrivateKey);
pPixPriv = dixLookupPrivate(&pPixmap->devPrivates, &lorieAHBPixPrivateKey);
size = pPixmap->devKind * pPixmap->drawable.height;