diff options
author | Dave Airlie <airlied@gmail.com> | 2016-04-29 14:01:31 +1000 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2016-06-21 12:10:25 +0200 |
commit | 5b4ced6d3a4c309e1792ac49017fb961a7262e7f (patch) | |
tree | b667f90fa3a17828ea82e3a2e4e57539315e1594 /hw | |
parent | cbbf4b0da098636e3d23407d62c3f41402c3f401 (diff) |
modesetting: set driverPrivate to NULL after closing fd.
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>
(cherry picked from commit a41a171bcbae9aeafac2865faa904f15d9b59925)
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xfree86/drivers/modesetting/driver.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c index 8f60eae57..0d5bc2435 100644 --- a/hw/xfree86/drivers/modesetting/driver.c +++ b/hw/xfree86/drivers/modesetting/driver.c @@ -624,7 +624,6 @@ FreeRec(ScrnInfoPtr pScrn) ms = modesettingPTR(pScrn); if (!ms) return; - pScrn->driverPrivate = NULL; if (ms->fd > 0) { modesettingEntPtr ms_ent; @@ -645,6 +644,7 @@ FreeRec(ScrnInfoPtr pScrn) ms_ent->fd = 0; } } + pScrn->driverPrivate = NULL; free(ms->drmmode.Options); free(ms); |