diff options
Diffstat (limited to 'common/main.cpp')
-rw-r--r-- | common/main.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/common/main.cpp b/common/main.cpp index 22236f43d6..4091eca481 100644 --- a/common/main.cpp +++ b/common/main.cpp @@ -240,4 +240,13 @@ void *operator new(size_t size) { void operator delete(void *ptr) { free(ptr); } + +#undef free(x) +void free_check(void *ptr) { + if ((uint)ptr == 0xE7E7E7E7UL) { + printf("ERROR: freeing 0xE7E7E7E7\n"); + exit(1); + } + free(ptr); +} #endif |