1
0
xorg-x11-server/U_modesetting-set-driverPrivate-to-NULL-after-closing-fd.patch

38 lines
1.2 KiB
Diff
Raw Normal View History

From: Dave Airlie <airlied@gmail.com>
Date: Fri Apr 29 14:01:31 2016 +1000
Subject: [PATCH]modesetting: set driverPrivate to NULL after closing fd.
Patch-mainline: Upstream
Git-repo: git://anongit.freedesktop.org/git/xorg/xserver
Git-commit: a41a171bcbae9aeafac2865faa904f15d9b59925
References: boo#981268
Signed-off-by: Egbert Eich <eich@suse.com>
Otherwise ms_ent_priv will return NULL and things will fall apart.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
hw/xfree86/drivers/modesetting/driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c
index c97f33a..abf7e1a 100644
--- a/hw/xfree86/drivers/modesetting/driver.c
+++ b/hw/xfree86/drivers/modesetting/driver.c
@@ -635,7 +635,6 @@ FreeRec(ScrnInfoPtr pScrn)
ms = modesettingPTR(pScrn);
if (!ms)
return;
- pScrn->driverPrivate = NULL;
if (ms->fd > 0) {
modesettingEntPtr ms_ent;
@@ -656,6 +655,7 @@ FreeRec(ScrnInfoPtr pScrn)
ms_ent->fd = 0;
}
}
+ pScrn->driverPrivate = NULL;
free(ms->drmmode.Options);
free(ms);