[Piglit] [PATCH] varying-packing-simple: Fix memory leak.

Vinson Lee vlee at freedesktop.org
Sun Dec 16 19:39:19 PST 2012


Fixes resource leak defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 tests/spec/glsl-1.10/execution/varying-packing/simple.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/spec/glsl-1.10/execution/varying-packing/simple.c b/tests/spec/glsl-1.10/execution/varying-packing/simple.c
index 5d36ccb..1b6f939 100644
--- a/tests/spec/glsl-1.10/execution/varying-packing/simple.c
+++ b/tests/spec/glsl-1.10/execution/varying-packing/simple.c
@@ -392,6 +392,7 @@ piglit_init(int argc, char **argv)
 			num_varyings, varyings);
 	prog = piglit_link_simple_program(vs, fs);
 	i_location = glGetUniformLocation(prog, "i");
+	free(varyings);
 }
 
 enum piglit_result
-- 
1.8.0.1



More information about the Piglit mailing list