From 9855da7cb6e3e6371a0f4cb32db9d9584b03f96a Mon Sep 17 00:00:00 2001 From: xchellx Date: Fri, 18 Oct 2024 00:19:29 -0400 Subject: [PATCH] Update STBIR__FREE_AND_CLEAR fix as per suggestions --- stb_image_resize2.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stb_image_resize2.h b/stb_image_resize2.h index 405a665..3cabe2d 100644 --- a/stb_image_resize2.h +++ b/stb_image_resize2.h @@ -6689,7 +6689,7 @@ static void stbir__get_split_info( stbir__per_split_info* split_info, int splits static void stbir__free_internal_mem( stbir__info *info ) { - #define STBIR__FREE_AND_CLEAR( ptr ) { if ( ptr ) { void * p = (ptr); STBIR_FREE( p, info->user_data); (ptr) = 0; } } + #define STBIR__FREE_AND_CLEAR( ptr ) { if ( ptr ) { void * p = (ptr); (ptr) = 0; STBIR_FREE( p, info->user_data); } } if ( info ) { @@ -6731,7 +6731,7 @@ static void stbir__free_internal_mem( stbir__info *info ) STBIR__FREE_AND_CLEAR( info->horizontal.coefficients ); STBIR__FREE_AND_CLEAR( info->horizontal.contributors ); STBIR__FREE_AND_CLEAR( info->alloced_mem ); - STBIR__FREE_AND_CLEAR( info ); + STBIR_FREE( info ); #endif }