Commit 926a6a35 authored by Neha Bhende's avatar Neha Bhende Committed by Brian Paul

draw: fix memory leak introduced 7720ce32

We need to free memory allocation PrimitiveOffsets in draw_gs_destroy().
This fixes memory leak found while running piglit on windows.

Fixes: 7720ce32 ("draw: add support to tgsi paths for geometry streams. (v2)")

Tested with piglit
Reviewed-by: Brian Paul's avatarBrian Paul <brianp@vmware.com>
Reviewed-by: Charmaine Lee's avatarCharmaine Lee <charmainel@vmware.com>
Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
parent d2aa65eb
Pipeline #37527 passed with stages
in 8 minutes and 19 seconds
......@@ -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);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment