blob: 11755be4f8a6827e23acecf2ea60e31734e26d7b [file] [log] [blame]
#pragma once
#include <cstdlib>
static inline void* mfree(void* memory)
{
free(memory);
return NULL;
}
static inline void freep(void* p)
{
*(void**)p = mfree(*(void**)p);
}
#define _cleanup_free_ _cleanup_(freep)
#define _cleanup_(x) __attribute__((__cleanup__(x)))