Skip to content
Myr

Update STBIR__FREE_AND_CLEAR fix as per suggestions

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by xchellx · committed by xchellx · parent 0625101 · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:stb_image_resize2.h+2 added-2 removed
6687 unmodified lines
6688}66896690static void stbir__free_internal_mem( stbir__info *info )6691{6692 #define STBIR__FREE_AND_CLEAR( ptr ) { if ( ptr ) { void * p = (ptr); STBIR_FREE( p, info->user_data); (ptr) = 0; } }6692 #define STBIR__FREE_AND_CLEAR( ptr ) { if ( ptr ) { void * p = (ptr); (ptr) = 0; STBIR_FREE( p, info->user_data); } }66936694 if ( info )6695 {6696 #ifndef STBIR__SEPARATE_ALLOCATIONS
33 unmodified lines
6730 }6731 STBIR__FREE_AND_CLEAR( info->horizontal.coefficients );6732 STBIR__FREE_AND_CLEAR( info->horizontal.contributors );6733 STBIR__FREE_AND_CLEAR( info->alloced_mem );6734 STBIR__FREE_AND_CLEAR( info );6734 STBIR_FREE( info );6735 #endif6736 }67376738 #undef STBIR__FREE_AND_CLEAR
3862 unmodified lines