summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorNeha Bhende <[email protected]>2019-05-16 15:46:00 -0600
committerBrian Paul <[email protected]>2019-05-17 12:26:48 -0600
commit926a6a35cf731552033224840c5b3e3edfd0131c (patch)
tree5062651960c760666d3ae41138e0b9c517c6df39 /src/gallium
parentd2aa65eb1892f7b300ac24560f9dbda6b600b5a7 (diff)
draw: fix memory leak introduced 7720ce32a
We need to free memory allocation PrimitiveOffsets in draw_gs_destroy(). This fixes memory leak found while running piglit on windows. Fixes: 7720ce32a ("draw: add support to tgsi paths for geometry streams. (v2)") Tested with piglit Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/draw/draw_gs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/draw/draw_gs.c b/src/gallium/auxiliary/draw/draw_gs.c
index 6420cfbb261..c752163ee05 100644
--- a/src/gallium/auxiliary/draw/draw_gs.c
+++ b/src/gallium/auxiliary/draw/draw_gs.c
@@ -753,8 +753,10 @@ void draw_gs_destroy( struct draw_context *draw )
{
int i;
if (draw->gs.tgsi.machine) {
- for (i = 0; i < TGSI_MAX_VERTEX_STREAMS; i++)
+ for (i = 0; i < TGSI_MAX_VERTEX_STREAMS; i++) {
align_free(draw->gs.tgsi.machine->Primitives[i]);
+ align_free(draw->gs.tgsi.machine->PrimitiveOffsets[i]);
+ }
tgsi_exec_machine_destroy(draw->gs.tgsi.machine);
}
}