diff options
author | Jakob Bornecrantz <[email protected]> | 2010-01-16 09:30:28 +0000 |
---|---|---|
committer | Jakob Bornecrantz <[email protected]> | 2010-01-16 10:44:57 +0000 |
commit | a5c03bd6f16517bf35c273741080492d70d64c29 (patch) | |
tree | 965e43507da238863b7fb3a8055e49379d7ea79a /src/gallium/auxiliary/draw/draw_gs.c | |
parent | 66e561a036199e1786bd315c0ca4b192ad2ae386 (diff) |
draw: Fix memory leak in gs code
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_gs.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_gs.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_gs.c b/src/gallium/auxiliary/draw/draw_gs.c index 5db2e755423..daf8d071f12 100644 --- a/src/gallium/auxiliary/draw/draw_gs.c +++ b/src/gallium/auxiliary/draw/draw_gs.c @@ -59,6 +59,15 @@ draw_gs_init( struct draw_context *draw ) return TRUE; } +void draw_gs_destroy( struct draw_context *draw ) +{ + if (!draw->gs.machine) + return; + + align_free(draw->gs.machine->Primitives); + + tgsi_exec_machine_destroy(draw->gs.machine); +} void draw_gs_set_constants( struct draw_context *draw, const float (*constants)[4], |