From fb218e582abd85f808fbe7b33ad8c0e8a7618bc3 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Mon, 22 Nov 2021 16:16:04 +0100 Subject: [PATCH] PSP: use SDL_malloc/SDL_free --- src/render/psp/SDL_render_psp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/render/psp/SDL_render_psp.c b/src/render/psp/SDL_render_psp.c index c1e0e6dd9..9dbcef514 100644 --- a/src/render/psp/SDL_render_psp.c +++ b/src/render/psp/SDL_render_psp.c @@ -221,7 +221,7 @@ TextureSwizzle(PSP_TextureData *psp_texture) unsigned int *src = (unsigned int*) psp_texture->data; unsigned char *data = NULL; - data = malloc(psp_texture->size); + data = SDL_malloc(psp_texture->size); int j; @@ -246,7 +246,7 @@ TextureSwizzle(PSP_TextureData *psp_texture) blockaddress += rowblocksadd; } - free(psp_texture->data); + SDL_free(psp_texture->data); psp_texture->data = data; psp_texture->swizzled = SDL_TRUE; @@ -272,7 +272,7 @@ int TextureUnswizzle(PSP_TextureData *psp_texture) unsigned char *data = NULL; - data = malloc(psp_texture->size); + data = SDL_malloc(psp_texture->size); if(!data) return 0; @@ -308,7 +308,7 @@ int TextureUnswizzle(PSP_TextureData *psp_texture) ydst += dstrow; } - free(psp_texture->data); + SDL_free(psp_texture->data); psp_texture->data = data;