xf86-video-intel: src/i830_video.c

Michel Daenzer daenzer at kemper.freedesktop.org
Tue Dec 18 10:38:51 PST 2007


 src/i830_video.c |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 4757a218d733af12d04674455fc6e1fad48a1cd0
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Tue Dec 18 19:37:46 2007 +0100

    Always set pPriv->buf to NULL after freeing the memory it pointed to.
    
    Fixes https://bugs.freedesktop.org/show_bug.cgi?id=13108 .

diff --git a/src/i830_video.c b/src/i830_video.c
index 5325bbd..9688aaa 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -2574,6 +2574,7 @@ I830VideoBlockHandler(int i, pointer blockData, pointer pTimeout,
 		 */
 		I830Sync(pScrn);
 		i830_free_memory(pScrn, pPriv->buf);
+		pPriv->buf = NULL;
 		pPriv->videoStatus = 0;
 	    }
 	}
@@ -2686,6 +2687,7 @@ I830FreeSurface(XF86SurfacePtr surface)
     /* Sync before freeing the buffer, because the pages will be unbound. */
     I830Sync(pScrn);
     i830_free_memory(surface->pScrn, pPriv->buf);
+    pPriv->buf = NULL;
     xfree(surface->pitches);
     xfree(surface->offsets);
     xfree(surface->devPrivate.ptr);


More information about the xorg-commit mailing list