diff options
author | José Fonseca <jrfonseca@tungstengraphics.com> | 2008-01-29 09:41:21 +0900 |
---|---|---|
committer | Ben Skeggs <skeggsb@gmail.com> | 2008-02-15 13:50:23 +1100 |
commit | d5dd52aea826c4b6a417d102ecdeae8c713e81f6 (patch) | |
tree | e77772d35406601084cf210cc67a0bb25179f93e /src/mesa/pipe/pipebuffer/pb_bufmgr_mm.c | |
parent | 5ec70aa03b59c514cba1fe8dae09118250fb15d6 (diff) |
gallium: Use CALLOC for pb_buffer to ensure that all fields of pipe_buffer are initiallized.
Diffstat (limited to 'src/mesa/pipe/pipebuffer/pb_bufmgr_mm.c')
-rw-r--r-- | src/mesa/pipe/pipebuffer/pb_bufmgr_mm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/pipe/pipebuffer/pb_bufmgr_mm.c b/src/mesa/pipe/pipebuffer/pb_bufmgr_mm.c index 2694f57bca..a2657dac59 100644 --- a/src/mesa/pipe/pipebuffer/pb_bufmgr_mm.c +++ b/src/mesa/pipe/pipebuffer/pb_bufmgr_mm.c @@ -399,6 +399,8 @@ mm_buffer_destroy(struct pb_buffer *buf) struct mm_buffer *mm_buf = mm_buffer(buf); struct mm_pb_manager *mm = mm_buf->mgr; + assert(buf->base.refcount == 0); + _glthread_LOCK_MUTEX(mm->mutex); mmFreeMem(mm_buf->block); FREE(buf); |