[Beignet] [PATCH 3/4] Fix a event leak in create context

Pan Xiuli xiuli.pan at intel.com
Thu Sep 24 02:13:26 PDT 2015


We get an event out of NDRangeKernel, and we don't release it.
As an gpgpu event it can also make drm buffer leak, to avoid
potenial error we just release it.w

Signed-off-by: Pan Xiuli <xiuli.pan at intel.com>
---
 src/cl_device_id.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/cl_device_id.c b/src/cl_device_id.c
index 78d2cf4..a3d3fc4 100644
--- a/src/cl_device_id.c
+++ b/src/cl_device_id.c
@@ -622,6 +622,7 @@ cl_self_test(cl_device_id device, cl_self_test_res atomic_in_l3_flag)
                   // Atomic fail need to test SLM again with atomic in L3 feature disabled.
                   tested = 0;
                 }
+                clReleaseEvent(kernel_finished);
               }
             }
             clReleaseMemObject(buffer);
-- 
2.1.4



More information about the Beignet mailing list