[Beignet] [PATCH 2/3] Fix a free bug for native kernel enqueue.

junyan.he at inbox.com junyan.he at inbox.com
Thu Aug 4 10:03:12 UTC 2016


From: Junyan He <junyan.he at intel.com>

Signed-off-by: Junyan He <junyan.he at intel.com>
---
 src/cl_enqueue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/cl_enqueue.c b/src/cl_enqueue.c
index f4ae07f..13aecd3 100644
--- a/src/cl_enqueue.c
+++ b/src/cl_enqueue.c
@@ -483,7 +483,6 @@ cl_enqueue_native_kernel(enqueue_data *data, cl_int status)
     cl_mem_unmap_auto(mem_list[i]);
   }
 
-  free(data->ptr);
 error:
   return err;
 }
@@ -547,6 +546,7 @@ cl_enqueue_delete(enqueue_data *data)
       cl_free((void*)data->const_ptr);
       data->const_ptr = NULL;
     }
+    return;
   }
 }
 
-- 
2.7.4

____________________________________________________________
Can't remember your password? Do you need a strong and secure password?
Use Password manager! It stores your passwords & protects your account.
Check it out at http://mysecurelogon.com/password-manager




More information about the Beignet mailing list