arb_direct_state_access: Fix memory leaks.

Submitted by Vinson Lee on May 18, 2017, 10:17 p.m.

Details

Message ID 1495145824-27825-2-git-send-email-vlee@freedesktop.org
State New
Headers show
Series "arb_direct_state_access: Fix memory leaks." ( rev: 1 ) in Piglit

Not browsing as part of any series.

Commit Message

Vinson Lee May 18, 2017, 10:17 p.m.
Fix Coverity resource leak defect.

CID: 1409706
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
---
 tests/spec/arb_direct_state_access/get-textures.c | 3 +++
 1 file changed, 3 insertions(+)

Patch hide | download patch | download mbox

diff --git a/tests/spec/arb_direct_state_access/get-textures.c b/tests/spec/arb_direct_state_access/get-textures.c
index 8b3372073867..5286b4605c82 100644
--- a/tests/spec/arb_direct_state_access/get-textures.c
+++ b/tests/spec/arb_direct_state_access/get-textures.c
@@ -116,6 +116,9 @@  valid_call:
 			  50 * 50 * 6 * 4, data);
 	pass = piglit_check_gl_error(GL_NO_ERROR) && pass;
 
+	free(data);
+	free(image);
+
 	return pass ? PIGLIT_PASS : PIGLIT_FAIL;
 }