utils: Add omf_free() to NULL the argument after free()
@@ -15,4 +15,9 @@ void *omf_calloc_real(size_t nmemb, size_t size, const char *file, int line);
omf_realloc_real((ptr), (size), __FILE__, __LINE__)
void *omf_realloc_real(void *ptr, size_t size, const char *file, int line);
+#define omf_free(ptr) { \
+ free(ptr); \
+ (ptr) = NULL; \
+}
+
#endif // _ALLOCATOR_H
