From 67ab7a70100e39a844718557f29d4ca13dfea01c Mon Sep 17 00:00:00 2001 From: Qinyu Date: Fri, 30 Oct 2020 22:49:48 +0800 Subject: [PATCH] Fix memory leak of test_basic (#943) (#948) Fix issue https://github.com/KhronosGroup/OpenCL-CTS/issues/943. Free buffer while verify fail. --- test_conformance/basic/test_async_strided_copy.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test_conformance/basic/test_async_strided_copy.cpp b/test_conformance/basic/test_async_strided_copy.cpp index fe76c844..c456f38d 100644 --- a/test_conformance/basic/test_async_strided_copy.cpp +++ b/test_conformance/basic/test_async_strided_copy.cpp @@ -215,6 +215,8 @@ int test_strided_copy(cl_device_id deviceID, cl_context context, cl_command_queu sprintf(values + strlen( values), "%2x ", outchar[j]); sprintf(values + strlen(values), "]"); log_error("%s\n", values); + free(inBuffer); + free(outBuffer); return -1; } }