diff options
author | Enrico Weigelt, metux IT consult <info@metux.net> | 2024-04-18 18:51:36 +0200 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2024-04-23 00:52:52 +0000 |
commit | 94451181c2d6f65d761cb79020a4de2909ece353 (patch) | |
tree | aa74732b7090642fe9e9430a3c24eddc1eafc39b /hw | |
parent | 86d0f6dafa00e78f7a234d50749c12948f2522ea (diff) |
xnest: fix segfault in miCreateScreenResources()
With aa3f5023e3fae0df74039702b6c8218bc14dc679, pScreen->devPrivate now is
initialized only once, which uncovered a silent bug in xnestOpenScreen:
It's NULL'ing the pScreen->devPrivate pointer which already had been
initialized by previous miScreenDevPrivateInit() call.
Fixes: aa3f5023e3fae0df74039702b6c8218bc14dc679
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1495>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xnest/Screen.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/xnest/Screen.c b/hw/xnest/Screen.c index 14763e0e7..6eb767233 100644 --- a/hw/xnest/Screen.c +++ b/hw/xnest/Screen.c @@ -20,6 +20,8 @@ is" without express or implied warranty. #include <X11/Xdefs.h> #include <X11/Xproto.h> +#include "mi/mi_priv.h" + #include "scrnintstr.h" #include "dix.h" #include "mi.h" @@ -257,7 +259,6 @@ xnestOpenScreen(ScreenPtr pScreen, int argc, char *argv[]) pScreen->blackPixel = xnestBlackPixel; /* GCperDepth */ /* defaultStipple */ - pScreen->devPrivate = NULL; /* WindowPrivateLen */ /* WindowPrivateSizes */ /* totalWindowSize */ @@ -419,7 +420,7 @@ xnestCloseScreen(ScreenPtr pScreen) free(pScreen->allowedDepths[i].vids); free(pScreen->allowedDepths); free(pScreen->visuals); - free(pScreen->devPrivate); + miScreenClose(pScreen); /* If xnestDoFullGeneration all x resources will be destroyed upon closing |