cl-api-get-kernel-info: Fix possible use after free.

Submitted by Vinson Lee on Feb. 8, 2014, 8:15 p.m.

Details

Message ID 1391890536-28108-1-git-send-email-vlee@freedesktop.org
State New
Headers show

Not browsing as part of any series.

Commit Message

Vinson Lee Feb. 8, 2014, 8:15 p.m.
Fixes "Use after free" defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
---
 tests/cl/api/get-kernel-info.c | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/tests/cl/api/get-kernel-info.c b/tests/cl/api/get-kernel-info.c
index a6718ca..b53fc6f 100644
--- a/tests/cl/api/get-kernel-info.c
+++ b/tests/cl/api/get-kernel-info.c
@@ -112,6 +112,7 @@  piglit_cl_test(const int argc,
 		//TODO: output returned values
 		printf("\n");
 		free(param_value);
+		param_value = NULL;
 	}
 
 	/*** Errors ***/