Fix potential use-after-free in XV overlay code on video stop.

This commit is contained in:
Eric Anholt 2007-10-10 16:48:12 -07:00
parent 56ae767180
commit 0040bb9544
1 changed files with 1 additions and 0 deletions

View File

@ -1016,6 +1016,7 @@ I830StopVideo(ScrnInfoPtr pScrn, pointer data, Bool shutdown)
*/
I830Sync(pScrn);
i830_free_memory(pScrn, pPriv->buf);
pPriv->buf = NULL;
pPriv->videoStatus = 0;
} else {
if (pPriv->videoStatus & CLIENT_VIDEO_ON) {