summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/nft.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/nft.h b/include/nft.h
index 3c894e5b..a2d62dbf 100644
--- a/include/nft.h
+++ b/include/nft.h
@@ -9,4 +9,10 @@
#include <stdlib.h>
#include <string.h>
+/* Just free(), but casts to a (void*). This is for places where
+ * we have a const pointer that we know we want to free. We could just
+ * do the (void*) cast, but free_const() makes it clear that this is
+ * something we frequently need to do and it's intentional. */
+#define free_const(ptr) free((void *)(ptr))
+
#endif /* NFTABLES_NFT_H */