From 99d25746b94b602f7b0f2381b73e0f52d11fca31 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 6 Aug 2013 11:33:45 +0200 Subject: src: add xfree and use it This patch adds xfree, a replacement of free that accepts const pointers. This helps to remove ugly castings that you usually need to calm down gcc. Signed-off-by: Pablo Neira Ayuso --- src/internal.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/internal.h') diff --git a/src/internal.h b/src/internal.h index d1c7690..4d39660 100644 --- a/src/internal.h +++ b/src/internal.h @@ -55,6 +55,8 @@ const char *nft_verdict2str(uint32_t verdict); int nft_str2verdict(const char *verdict); int nft_get_value(enum nft_type type, void *val, void *out); +void xfree(const void *ptr); + struct expr_ops; struct nft_rule_expr { -- cgit v1.2.3