Skip to content

Commit

Permalink
Update STBIR__FREE_AND_CLEAR fix as per suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
xchellx committed Oct 18, 2024
1 parent 0625101 commit 9855da7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stb_image_resize2.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
{
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit 9855da7

Please sign in to comment.