summaryrefslogtreecommitdiff
path: root/src/i830_video.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2007-12-18 19:37:46 +0100
committerMichel Dänzer <michel@tungstengraphics.com>2007-12-18 19:37:46 +0100
commit4757a218d733af12d04674455fc6e1fad48a1cd0 (patch)
tree99eb6236d49f10ceb37426535650e35f6cf13c7b /src/i830_video.c
parent5cbb4110116f6d4187fd27660a78203caa1da46b (diff)
Always set pPriv->buf to NULL after freeing the memory it pointed to.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=13108 .
Diffstat (limited to 'src/i830_video.c')
-rw-r--r--src/i830_video.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/i830_video.c b/src/i830_video.c
index 5325bbdb..9688aaa8 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);