exynos: disable crtc before freeing buffers

The crtc should be disabled before deallocating the buffers, otherwise
leading to a use-after-free scenario, which can trigger all sorts
of funny effects.
This commit is contained in:
Tobias Jakobi 2014-07-11 00:39:12 +02:00
parent 19419b04af
commit e197e97d67

View File

@ -821,6 +821,10 @@ fail_alloc:
static void exynos_free(struct exynos_data *pdata) {
unsigned i;
/* Disable the CRTC. */
drmModeSetCrtc(pdata->fd, pdata->drm->crtc_id, 0,
0, 0, &pdata->drm->connector_id, 1, NULL);
clean_up_pages(pdata->pages, pdata->num_pages);
free(pdata->pages);