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

Yang, Rong R rong.r.yang at intel.com
Thu Sep 29 03:56:01 UTC 2016


> -----Original Message-----
> From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of
> junyan.he at inbox.com
> Sent: Thursday, August 4, 2016 18:03
> To: beignet at lists.freedesktop.org
> Subject: [Beignet] [PATCH 2/3] Fix a free bug for native kernel enqueue.
> 
> 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);
data->ptr is malloc in function clEnqueueNativeKernel and is a copy of args, I think need call cl_free here.

>  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
> 
> 
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list