[Piglit] [PATCH] arb_uniform_buffer_object: Fix memory leak.

Vinson Lee vlee at freedesktop.org
Sat Dec 1 22:30:41 PST 2012


Fix resource leak defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 tests/spec/arb_uniform_buffer_object/maxblocks.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/spec/arb_uniform_buffer_object/maxblocks.c b/tests/spec/arb_uniform_buffer_object/maxblocks.c
index b48db02..3fab86c 100644
--- a/tests/spec/arb_uniform_buffer_object/maxblocks.c
+++ b/tests/spec/arb_uniform_buffer_object/maxblocks.c
@@ -251,6 +251,7 @@ pass_link_test(int y_index,
 	if (!prog) {
 		printf("shader with (%d, %d) blocks failed to link\n",
 		       vs_blocks, fs_blocks);
+		free(bos);
 		return false;
 	}
 
-- 
1.8.0.1



More information about the Piglit mailing list