summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authornobled <[email protected]>2010-07-24 12:05:30 +0000
committerJakob Bornecrantz <[email protected]>2010-07-26 12:26:58 -0700
commitb1ef3e08634e3c382c5dc10c3000427a8f7a4bfa (patch)
tree5847436e58372fa5fe81289b4c94ae6a632bee8b /src/gallium
parent0697d41fce6e7cad4badc54cecdd25f1f312c93f (diff)
st/xorg: fix use-after-free
Acked-by: Jakob Bornecrantz <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/state_trackers/xorg/xorg_driver.c2
1 files changed, 1 insertions, 1 deletions
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);
}