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>
This commit is contained in:
parent
fc1f61b75c
commit
a41a171bcb
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user