From ac7bd2a6a076bd083b65b57d92b8543c8d1f4c08 Mon Sep 17 00:00:00 2001 From: Flyinghead Date: Mon, 4 Jan 2021 21:21:35 +0100 Subject: [PATCH] free()/delete[] mismatch --- core/rend/CustomTexture.cpp | 2 +- core/rend/TexCache.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/rend/CustomTexture.cpp b/core/rend/CustomTexture.cpp index 4b02588f9..7a9b8ad07 100644 --- a/core/rend/CustomTexture.cpp +++ b/core/rend/CustomTexture.cpp @@ -55,7 +55,7 @@ void CustomTexture::LoaderThread() texture->ComputeHash(); if (texture->custom_image_data != NULL) { - delete [] texture->custom_image_data; + free(texture->custom_image_data); texture->custom_image_data = NULL; } if (!texture->dirty) diff --git a/core/rend/TexCache.cpp b/core/rend/TexCache.cpp index 8ec17d07b..7840e8210 100644 --- a/core/rend/TexCache.cpp +++ b/core/rend/TexCache.cpp @@ -414,7 +414,7 @@ bool BaseTextureCacheData::Delete() lock_block = nullptr; } - delete[] custom_image_data; + free(custom_image_data); return true; } @@ -735,7 +735,7 @@ void BaseTextureCacheData::CheckCustomTexture() { tex_type = TextureType::_8888; UploadToGPU(custom_width, custom_height, custom_image_data, IsMipmapped(), false); - delete [] custom_image_data; + free(custom_image_data); custom_image_data = NULL; } }