[Beignet] [PATCH] Fix delete operator using.
Zhigang Gong
zhigang.gong at linux.intel.com
Mon Dec 15 22:39:42 PST 2014
LGTM, will push latter. Thanks.
On Tue, Dec 09, 2014 at 12:57:52PM +0800, Yan Wang wrote:
> The 2 delete operators work on array pointer.
>
> Signed-off-by: Yan Wang <yan.wang at linux.intel.com>
> ---
> utests/compiler_fill_gl_image.cpp | 2 +-
> utests/utest_helper.cpp | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/utests/compiler_fill_gl_image.cpp b/utests/compiler_fill_gl_image.cpp
> index 87d2fcd..f1eb8e7 100644
> --- a/utests/compiler_fill_gl_image.cpp
> +++ b/utests/compiler_fill_gl_image.cpp
> @@ -70,7 +70,7 @@ static void compiler_fill_gl_image(void)
> for (uint32_t i = 0; i < w; i++)
> OCL_ASSERT(resultColor[j * w + i] == color);
> OCL_UNMAP_BUFFER(0);
> - delete resultColor;
> + delete[] resultColor;
> }
>
> MAKE_UTEST_FROM_FUNCTION(compiler_fill_gl_image);
> diff --git a/utests/utest_helper.cpp b/utests/utest_helper.cpp
> index 606c1bf..591054e 100644
> --- a/utests/utest_helper.cpp
> +++ b/utests/utest_helper.cpp
> @@ -401,7 +401,7 @@ cl_ocl_init(void)
>
> error:
> if (props)
> - delete props;
> + delete[] props;
> return status;
> }
>
> --
> 1.9.3
>
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list