diff options
Diffstat (limited to 'include/malloc.h')
-rw-r--r-- | include/malloc.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/malloc.h b/include/malloc.h index a6abab5e4..6efa8fbef 100644 --- a/include/malloc.h +++ b/include/malloc.h @@ -6,6 +6,12 @@ #define calloc(ct, sz) AllocZeroed((ct) * (sz)) #define free Free +#define FREE_AND_SET_NULL(ptr) \ +{ \ + free(ptr); \ + ptr = NULL; \ +} + extern u8 gHeap[]; void *Alloc(u32 size); void *AllocZeroed(u32 size); |