[PATCH xserver] xf86XvMCScreenInit: Clear pScreenPriv->dixinfo when freeing pAdapt

Michel Dänzer michel at daenzer.net
Wed Jan 24 11:28:38 UTC 2018


From: Michel Dänzer <michel.daenzer at amd.com>

Fixes double-free later in xf86XvMCCloseScreen, which would generally
cause fireworks.

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 hw/xfree86/common/xf86xvmc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/xfree86/common/xf86xvmc.c b/hw/xfree86/common/xf86xvmc.c
index a0a94c74b..c67418bf4 100644
--- a/hw/xfree86/common/xf86xvmc.c
+++ b/hw/xfree86/common/xf86xvmc.c
@@ -187,6 +187,7 @@ xf86XvMCScreenInit(ScreenPtr pScreen,
         }
         if (!pAdapt[i].xv_adaptor) {
             /* no adaptor by that name */
+            pScreenPriv->dixinfo = FALSE;
             free(pAdapt);
             return FALSE;
         }
-- 
2.15.1



More information about the xorg-devel mailing list