st/xorg: fix use-after-free

Acked-by: Jakob Bornecrantz <jakob@vmware.com>
This commit is contained in:
nobled 2010-07-24 12:05:30 +00:00 committed by Jakob Bornecrantz
parent 0697d41fce
commit b1ef3e0863
1 changed files with 1 additions and 1 deletions

View File

@ -472,7 +472,6 @@ drv_pre_init(ScrnInfoPtr pScrn, int flags)
max_height = max < max_height ? max : max_height;
}
drmModeFreeResources(res);
xf86CrtcSetSizeRange(pScrn, res->min_width,
res->min_height, max_width, max_height);
xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
@ -481,6 +480,7 @@ drv_pre_init(ScrnInfoPtr pScrn, int flags)
xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
"Min height %d, Max Height %d.\n",
res->min_height, max_height);
drmModeFreeResources(res);
}