We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6c8d532 commit 95d02bcCopy full SHA for 95d02bc
1 file changed
include/bfdev/allocator.h
@@ -10,6 +10,8 @@
10
#include <bfdev/config.h>
11
#include <bfdev/types.h>
12
#include <bfdev/stddef.h>
13
+#include <bfdev/guards.h>
14
+#include <bfdev/errptr.h>
15
16
BFDEV_BEGIN_DECLS
17
@@ -125,6 +127,11 @@ bfdev_realloc_array(const bfdev_alloc_t *alloc,
125
127
return bfdev_realloc(alloc, block, size * nr);
126
128
}
129
130
+BFDEV_DEFINE_CLEAN(bfdev_free, void *,
131
+ if (!BFDEV_IS_INVAL(_T))
132
+ bfdev_free(BFDEV_NULL, _T);
133
+)
134
+
135
BFDEV_END_DECLS
136
137
#endif /* _BFDEV_ALLOCATOR_H_ */
0 commit comments