dix: let FreeGCperDepth() operate on ScreenPtr and NULL protect it

Instead of retrieving the screen index from ScreenRec and passing this,
so the ScreenRec is looked up again, just pass in the ScreenPtr that
already have anyways.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-03-13 13:13:47 +01:00
parent 1eaf1b0191
commit d56d8307c1
3 changed files with 6 additions and 5 deletions

View File

@@ -334,7 +334,7 @@ dix_main(int argc, char *argv[], char *envp[])
}
for (i = screenInfo.numScreens - 1; i >= 0; i--) {
FreeGCperDepth(i);
FreeGCperDepth(screenInfo.screens[i]);
FreeDefaultStipple(i);
dixFreeScreenSpecificPrivates(screenInfo.screens[i]);
(*screenInfo.screens[i]->CloseScreen) (screenInfo.screens[i]);