diff options
author | Keith Whitwell <[email protected]> | 2008-05-09 15:02:59 +0100 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2008-05-09 15:02:59 +0100 |
commit | 5ee2b5bdcc62e844079829f4f4301aad5374c62e (patch) | |
tree | 9b67c3cea203acc3a2119faabd536a2c37b53d95 /src | |
parent | 2f9b1b9cc20f079cb46bbbcc9db09880070e4de9 (diff) |
draw: fix translate double-free, minor cleanups
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pipe_vbuf.c | 3 | ||||
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt_fetch.c | 3 | ||||
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt_fetch_emit.c | 3 |
3 files changed, 4 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pipe_vbuf.c b/src/gallium/auxiliary/draw/draw_pipe_vbuf.c index 86a7d1c7303..67b9a9503d2 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_vbuf.c +++ b/src/gallium/auxiliary/draw/draw_pipe_vbuf.c @@ -427,9 +427,6 @@ static void vbuf_destroy( struct draw_stage *stage ) if(vbuf->indices) align_free( vbuf->indices ); - if(vbuf->translate) - vbuf->translate->release( vbuf->translate ); - if (vbuf->render) vbuf->render->destroy( vbuf->render ); diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch.c b/src/gallium/auxiliary/draw/draw_pt_fetch.c index 100117a9aef..b96335b7895 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch.c @@ -184,7 +184,8 @@ struct pt_fetch *draw_pt_fetch_create( struct draw_context *draw ) void draw_pt_fetch_destroy( struct pt_fetch *fetch ) { - translate_cache_destroy(fetch->cache); + if (fetch->cache) + translate_cache_destroy(fetch->cache); FREE(fetch); } diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c b/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c index b7b970a297f..4ea7d4359ff 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c @@ -268,7 +268,8 @@ static void fetch_emit_destroy( struct draw_pt_middle_end *middle ) { struct fetch_emit_middle_end *feme = (struct fetch_emit_middle_end *)middle; - translate_cache_destroy(feme->cache); + if (feme->cache) + translate_cache_destroy(feme->cache); FREE(middle); } |