mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-30 00:37:23 +01:00
14 lines
239 B
C
14 lines
239 B
C
#pragma once
|
|
|
|
#include <stdlib.h>
|
|
#include <assert.h>
|
|
|
|
static inline void ffWrapFree(const void* pPtr)
|
|
{
|
|
assert(pPtr);
|
|
if(*(void**)pPtr)
|
|
free(*(void**)pPtr);
|
|
}
|
|
|
|
#define FF_AUTO_FREE __attribute__((__cleanup__(ffWrapFree)))
|