From: nobled Date: Sat, 24 Jul 2010 12:05:30 +0000 (+0000) Subject: st/xorg: fix use-after-free X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b1ef3e08634e3c382c5dc10c3000427a8f7a4bfa;p=mesa.git st/xorg: fix use-after-free Acked-by: Jakob Bornecrantz --- diff --git a/src/gallium/state_trackers/xorg/xorg_driver.c b/src/gallium/state_trackers/xorg/xorg_driver.c index e993ccc9bf0..e10ff2f9508 100644 --- a/src/gallium/state_trackers/xorg/xorg_driver.c +++ b/src/gallium/state_trackers/xorg/xorg_driver.c @@ -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); }