Files
fastfetch/src/util/mallocHelper.h
T

11 lines
199 B
C
Raw Normal View History

2022-11-23 15:10:40 +08:00
#include <stdlib.h>
static inline void ffWrapFree(void* pPtr)
{
assert(pPtr);
2022-11-23 15:10:40 +08:00
if(*(void**)pPtr)
free(*(void**)pPtr);
}
#define FF_AUTO_FREE __attribute__((__cleanup__(ffWrapFree)))