From 77830f228449ec34d69e746bbf3e5b2de374f513 Mon Sep 17 00:00:00 2001 From: Oleh Nykyforchyn Date: Sat, 22 Nov 2025 14:01:48 +0200 Subject: [PATCH] modesetting: make DevPrivateKeyRec struct static dixRegisterPrivateKey() assumes that DevPrivateKeyRec struct passed to it is zero-filled before the first use, otherwise assert() fails. Therefore these structs are usually static, which assures that they are initialized to 0. A newly introduced key in the modesetting driver was not static, and the driver crashed. This should be corrected. Signed-off-by: Oleh Nykyforchyn --- hw/xfree86/drivers/video/modesetting/driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/drivers/video/modesetting/driver.c b/hw/xfree86/drivers/video/modesetting/driver.c index 3b82828a6..a2f35dbf9 100644 --- a/hw/xfree86/drivers/video/modesetting/driver.c +++ b/hw/xfree86/drivers/video/modesetting/driver.c @@ -159,7 +159,7 @@ static const OptionInfoRec Options[] = { int ms_entity_index = -1; -DevPrivateKeyRec asyncFlipPrivateKeyRec; +static DevPrivateKeyRec asyncFlipPrivateKeyRec; static MODULESETUPPROTO(Setup);