代码拉取完成,页面将自动刷新
From b6fe3f924aecac6d6e311673511ce61aa2f7a81f Mon Sep 17 00:00:00 2001
From: Peter Hutterer <[email protected]>
Date: Thu, 12 Oct 2023 12:42:06 +1000
Subject: [PATCH] mi: fix CloseScreen initialization order
If SHM is enabled it will set the CloseScreen pointer, only to be
overridden by the hardcoded miCloseScreen pointer. Do this the other way
round, miCloseScreen is the bottom of our stack.
Direct leak of 48 byte(s) in 2 object(s) allocated from:
#0 0x7f5ea3ad8cc7 in calloc (/lib64/libasan.so.8+0xd8cc7) (BuildId: d8f3addefe29e892d775c30eb364afd3c2484ca5))
#1 0x70adfb in ShmInitScreenPriv ../Xext/shm.c:213
Signed-off-by: Peter Hutterer <[email protected]>
Reviewed-by: Adam Jackson <[email protected]>
---
mi/miscrinit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mi/miscrinit.c b/mi/miscrinit.c
index 264622d..907e46a 100644
--- a/mi/miscrinit.c
+++ b/mi/miscrinit.c
@@ -242,10 +242,10 @@ miScreenInit(ScreenPtr pScreen, void *pbits, /* pointer to screen bits */
pScreen->numVisuals = numVisuals;
pScreen->visuals = visuals;
if (width) {
+ pScreen->CloseScreen = miCloseScreen;
#ifdef MITSHM
ShmRegisterFbFuncs(pScreen);
#endif
- pScreen->CloseScreen = miCloseScreen;
}
/* else CloseScreen */
/* QueryBestSize, SaveScreen, GetImage, GetSpans */
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。