summaryrefslogtreecommitdiffstats
path: root/src/expr/immediate.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2013-08-06 11:33:45 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2013-08-06 11:33:45 +0200
commit99d25746b94b602f7b0f2381b73e0f52d11fca31 (patch)
tree0fa195f88207a21a464c814d3ae3e24d03fba6dd /src/expr/immediate.c
parent19925e0fbc1d709212ed82fe4e43fe6ef1ec3539 (diff)
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 <pablo@netfilter.org>
Diffstat (limited to 'src/expr/immediate.c')
-rw-r--r--src/expr/immediate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/expr/immediate.c b/src/expr/immediate.c
index e65bd7c..2061172 100644
--- a/src/expr/immediate.c
+++ b/src/expr/immediate.c
@@ -46,7 +46,7 @@ nft_rule_expr_immediate_set(struct nft_rule_expr *e, uint16_t type,
break;
case NFT_EXPR_IMM_CHAIN:
if (imm->data.chain)
- free(imm->data.chain);
+ xfree(imm->data.chain);
imm->data.chain = strdup(data);
break;