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