diff options
author | itskobold <itskobold@users.noreply.github.com> | 2017-11-15 12:41:25 +0000 |
---|---|---|
committer | itskobold <itskobold@users.noreply.github.com> | 2017-11-15 12:41:25 +0000 |
commit | 2acab81713aac51f96a50dc42a67ec7761901aa4 (patch) | |
tree | c39251dc3e6eb2f7cc884cbe4953b8c34dce8423 /include/malloc.h | |
parent | e373cf4bb9217eb5e4edba08c7cb95ecc895b821 (diff) | |
parent | 72b57b342eaf6e4a3ea77fae8b40e4ab11c64ae2 (diff) |
Merge branch 'master' of https://github.com/pret/pokeemerald
also started fixing pointers in my dumps
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 f3a731797..003ee1f03 100644 --- a/include/malloc.h +++ b/include/malloc.h @@ -5,6 +5,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); |