From 291bfa5902a6959486cabf12188fc8e51ae602fc Mon Sep 17 00:00:00 2001 From: Baruch Siach Date: Fri, 5 Jul 2019 06:08:12 +0300 Subject: [PATCH] package/libnftnl: drop obsolete patch Patch #1 is obsolete since upstream commit 244d60de2f1 ("utils: define xfree() as macro") in version 1.0.3. xfree is no longer a symbol, so it can't conflict with symbols of the code libnftnl links with. Cc: Yegor Yefremov Signed-off-by: Baruch Siach Signed-off-by: Peter Korsgaard --- ...d-Libs.private-field-to-libnftnl.pc.patch} | 0 ...libnftnl_xfree-to-avoid-symbol-namin.patch | 1050 ----------------- 2 files changed, 1050 deletions(-) rename package/libnftnl/{0002-Add-Libs.private-field-to-libnftnl.pc.patch => 0001-Add-Libs.private-field-to-libnftnl.pc.patch} (100%) delete mode 100644 package/libnftnl/0001-Rename-xfree-to-libnftnl_xfree-to-avoid-symbol-namin.patch diff --git a/package/libnftnl/0002-Add-Libs.private-field-to-libnftnl.pc.patch b/package/libnftnl/0001-Add-Libs.private-field-to-libnftnl.pc.patch similarity index 100% rename from package/libnftnl/0002-Add-Libs.private-field-to-libnftnl.pc.patch rename to package/libnftnl/0001-Add-Libs.private-field-to-libnftnl.pc.patch diff --git a/package/libnftnl/0001-Rename-xfree-to-libnftnl_xfree-to-avoid-symbol-namin.patch b/package/libnftnl/0001-Rename-xfree-to-libnftnl_xfree-to-avoid-symbol-namin.patch deleted file mode 100644 index e1ef576285..0000000000 --- a/package/libnftnl/0001-Rename-xfree-to-libnftnl_xfree-to-avoid-symbol-namin.patch +++ /dev/null @@ -1,1050 +0,0 @@ -From 90a0152c224fa90f648b27187859bd84f6426e1b Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni -Date: Thu, 2 Jun 2016 23:03:27 -0300 -Subject: [PATCH] Rename xfree() to libnftnl_xfree() to avoid symbol naming - conflict - -When ELF binaries and shared libraries are used, the internal -functions of libnftnl such as xfree() are not visible to the outside -world (their visibility is 'hidden'). Therefore, the fact that other -programs (especially nftables) may have symbols with the same name -does not cause any problem. - -However, when doing static linking on a non-ELF platform (such as -Blackfin, which uses the FLAT binary format), there is no way of -encoding this visibility. Therefore, the xfree() symbols of libnftnl -becomes visible to the outside world, causing a conflict with the -xfree() symbol defined by nftables. - -To solve this, this patch renames the libnftnl xfree() function to -libnftnl_xfree(). - -Signed-off-by: Thomas Petazzoni -[Gustavo: update for version 1.0.7] -Signed-off-by: Gustavo Zacarias -[baruch: update for versions 1.0.9, 1.1.2, 1.1.3] -Signed-off-by: Baruch Siach ---- - include/utils.h | 2 +- - src/chain.c | 38 +++++++++++++++++++------------------- - src/common.c | 2 +- - src/expr.c | 4 ++-- - src/expr/data_reg.c | 2 +- - src/expr/dynset.c | 2 +- - src/expr/flow_offload.c | 2 +- - src/expr/immediate.c | 2 +- - src/expr/log.c | 6 +++--- - src/expr/lookup.c | 2 +- - src/expr/match.c | 6 +++--- - src/expr/target.c | 6 +++--- - src/flowtable.c | 34 +++++++++++++++++----------------- - src/gen.c | 2 +- - src/object.c | 14 +++++++------- - src/rule.c | 32 ++++++++++++++++---------------- - src/ruleset.c | 2 +- - src/set.c | 28 ++++++++++++++-------------- - src/set_elem.c | 28 ++++++++++++++-------------- - src/table.c | 14 +++++++------- - src/trace.c | 14 +++++++------- - src/udata.c | 2 +- - src/utils.c | 2 +- - 23 files changed, 123 insertions(+), 123 deletions(-) - -diff --git a/include/utils.h b/include/utils.h -index 3cc659652fe2..820556715013 100644 ---- a/include/utils.h -+++ b/include/utils.h -@@ -17,7 +17,7 @@ - - #define __noreturn __attribute__((__noreturn__)) - --#define xfree(ptr) free((void *)ptr); -+#define nftnl_xfree(ptr) free((void *)ptr); - - #define div_round_up(n, d) (((n) + (d) - 1) / (d)) - -diff --git a/src/chain.c b/src/chain.c -index 26f9b9d61053..06316a26b075 100644 ---- a/src/chain.c -+++ b/src/chain.c -@@ -114,14 +114,14 @@ void nftnl_chain_free(const struct nftnl_chain *c) - nftnl_rule_free(r); - - if (c->flags & (1 << NFTNL_CHAIN_NAME)) -- xfree(c->name); -+ nftnl_xfree(c->name); - if (c->flags & (1 << NFTNL_CHAIN_TABLE)) -- xfree(c->table); -+ nftnl_xfree(c->table); - if (c->flags & (1 << NFTNL_CHAIN_TYPE)) -- xfree(c->type); -+ nftnl_xfree(c->type); - if (c->flags & (1 << NFTNL_CHAIN_DEV)) -- xfree(c->dev); -- xfree(c); -+ nftnl_xfree(c->dev); -+ nftnl_xfree(c); - } - - EXPORT_SYMBOL(nftnl_chain_is_set); -@@ -138,15 +138,15 @@ void nftnl_chain_unset(struct nftnl_chain *c, uint16_t attr) - - switch (attr) { - case NFTNL_CHAIN_NAME: -- xfree(c->name); -+ nftnl_xfree(c->name); - break; - case NFTNL_CHAIN_TABLE: -- xfree(c->table); -+ nftnl_xfree(c->table); - break; - case NFTNL_CHAIN_USE: - break; - case NFTNL_CHAIN_TYPE: -- xfree(c->type); -+ nftnl_xfree(c->type); - break; - case NFTNL_CHAIN_HOOKNUM: - case NFTNL_CHAIN_PRIO: -@@ -157,7 +157,7 @@ void nftnl_chain_unset(struct nftnl_chain *c, uint16_t attr) - case NFTNL_CHAIN_FAMILY: - break; - case NFTNL_CHAIN_DEV: -- xfree(c->dev); -+ nftnl_xfree(c->dev); - break; - default: - return; -@@ -186,7 +186,7 @@ int nftnl_chain_set_data(struct nftnl_chain *c, uint16_t attr, - switch(attr) { - case NFTNL_CHAIN_NAME: - if (c->flags & (1 << NFTNL_CHAIN_NAME)) -- xfree(c->name); -+ nftnl_xfree(c->name); - - c->name = strdup(data); - if (!c->name) -@@ -194,7 +194,7 @@ int nftnl_chain_set_data(struct nftnl_chain *c, uint16_t attr, - break; - case NFTNL_CHAIN_TABLE: - if (c->flags & (1 << NFTNL_CHAIN_TABLE)) -- xfree(c->table); -+ nftnl_xfree(c->table); - - c->table = strdup(data); - if (!c->table) -@@ -226,7 +226,7 @@ int nftnl_chain_set_data(struct nftnl_chain *c, uint16_t attr, - break; - case NFTNL_CHAIN_TYPE: - if (c->flags & (1 << NFTNL_CHAIN_TYPE)) -- xfree(c->type); -+ nftnl_xfree(c->type); - - c->type = strdup(data); - if (!c->type) -@@ -234,7 +234,7 @@ int nftnl_chain_set_data(struct nftnl_chain *c, uint16_t attr, - break; - case NFTNL_CHAIN_DEV: - if (c->flags & (1 << NFTNL_CHAIN_DEV)) -- xfree(c->dev); -+ nftnl_xfree(c->dev); - - c->dev = strdup(data); - if (!c->dev) -@@ -588,7 +588,7 @@ int nftnl_chain_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_chain *c) - - if (tb[NFTA_CHAIN_NAME]) { - if (c->flags & (1 << NFTNL_CHAIN_NAME)) -- xfree(c->name); -+ nftnl_xfree(c->name); - c->name = strdup(mnl_attr_get_str(tb[NFTA_CHAIN_NAME])); - if (!c->name) - return -1; -@@ -596,7 +596,7 @@ int nftnl_chain_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_chain *c) - } - if (tb[NFTA_CHAIN_TABLE]) { - if (c->flags & (1 << NFTNL_CHAIN_TABLE)) -- xfree(c->table); -+ nftnl_xfree(c->table); - c->table = strdup(mnl_attr_get_str(tb[NFTA_CHAIN_TABLE])); - if (!c->table) - return -1; -@@ -626,7 +626,7 @@ int nftnl_chain_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_chain *c) - } - if (tb[NFTA_CHAIN_TYPE]) { - if (c->flags & (1 << NFTNL_CHAIN_TYPE)) -- xfree(c->type); -+ nftnl_xfree(c->type); - c->type = strdup(mnl_attr_get_str(tb[NFTA_CHAIN_TYPE])); - if (!c->type) - return -1; -@@ -810,7 +810,7 @@ struct nftnl_rule *nftnl_rule_iter_next(struct nftnl_rule_iter *iter) - EXPORT_SYMBOL(nftnl_rule_iter_destroy); - void nftnl_rule_iter_destroy(struct nftnl_rule_iter *iter) - { -- xfree(iter); -+ nftnl_xfree(iter); - } - - #define CHAIN_NAME_HSIZE 512 -@@ -848,7 +848,7 @@ void nftnl_chain_list_free(struct nftnl_chain_list *list) - hlist_del(&r->hnode); - nftnl_chain_free(r); - } -- xfree(list); -+ nftnl_xfree(list); - } - - EXPORT_SYMBOL(nftnl_chain_list_is_empty); -@@ -967,5 +967,5 @@ struct nftnl_chain *nftnl_chain_list_iter_next(struct nftnl_chain_list_iter *ite - EXPORT_SYMBOL(nftnl_chain_list_iter_destroy); - void nftnl_chain_list_iter_destroy(struct nftnl_chain_list_iter *iter) - { -- xfree(iter); -+ nftnl_xfree(iter); - } -diff --git a/src/common.c b/src/common.c -index feb13b2aa836..de7e9d08b9e2 100644 ---- a/src/common.c -+++ b/src/common.c -@@ -68,7 +68,7 @@ struct nftnl_parse_err *nftnl_parse_err_alloc(void) - EXPORT_SYMBOL(nftnl_parse_err_free); - void nftnl_parse_err_free(struct nftnl_parse_err *err) - { -- xfree(err); -+ nftnl_xfree(err); - } - - EXPORT_SYMBOL(nftnl_parse_perror); -diff --git a/src/expr.c b/src/expr.c -index 80c4c36a9bd7..f5e44cd16349 100644 ---- a/src/expr.c -+++ b/src/expr.c -@@ -51,7 +51,7 @@ void nftnl_expr_free(const struct nftnl_expr *expr) - if (expr->ops->free) - expr->ops->free(expr); - -- xfree(expr); -+ nftnl_xfree(expr); - } - - EXPORT_SYMBOL(nftnl_expr_is_set); -@@ -260,7 +260,7 @@ struct nftnl_expr *nftnl_expr_parse(struct nlattr *attr) - return expr; - - err2: -- xfree(expr); -+ nftnl_xfree(expr); - err1: - return NULL; - } -diff --git a/src/expr/data_reg.c b/src/expr/data_reg.c -index 67165feb931f..c6f3cec48caf 100644 ---- a/src/expr/data_reg.c -+++ b/src/expr/data_reg.c -@@ -225,7 +225,7 @@ void nftnl_free_verdict(const union nftnl_data_reg *data) - switch(data->verdict) { - case NFT_JUMP: - case NFT_GOTO: -- xfree(data->chain); -+ nftnl_xfree(data->chain); - break; - default: - break; -diff --git a/src/expr/dynset.c b/src/expr/dynset.c -index 68115ba50c94..4e8093b7e9db 100644 ---- a/src/expr/dynset.c -+++ b/src/expr/dynset.c -@@ -276,7 +276,7 @@ static void nftnl_expr_dynset_free(const struct nftnl_expr *e) - { - struct nftnl_expr_dynset *dynset = nftnl_expr_data(e); - -- xfree(dynset->set_name); -+ nftnl_xfree(dynset->set_name); - } - - struct expr_ops expr_ops_dynset = { -diff --git a/src/expr/flow_offload.c b/src/expr/flow_offload.c -index 6ccec9a13396..877ad072ba53 100644 ---- a/src/expr/flow_offload.c -+++ b/src/expr/flow_offload.c -@@ -122,7 +122,7 @@ static void nftnl_expr_flow_free(const struct nftnl_expr *e) - { - struct nftnl_expr_flow *flow = nftnl_expr_data(e); - -- xfree(flow->table_name); -+ nftnl_xfree(flow->table_name); - } - - struct expr_ops expr_ops_flow = { -diff --git a/src/expr/immediate.c b/src/expr/immediate.c -index 47106ae86675..b0289f9397fb 100644 ---- a/src/expr/immediate.c -+++ b/src/expr/immediate.c -@@ -44,7 +44,7 @@ nftnl_expr_immediate_set(struct nftnl_expr *e, uint16_t type, - break; - case NFTNL_EXPR_IMM_CHAIN: - if (e->flags & (1 << NFTNL_EXPR_IMM_CHAIN)) -- xfree(imm->data.chain); -+ nftnl_xfree(imm->data.chain); - - imm->data.chain = strdup(data); - if (!imm->data.chain) -diff --git a/src/expr/log.c b/src/expr/log.c -index bbe43d2dc6bc..a5952ce10ccc 100644 ---- a/src/expr/log.c -+++ b/src/expr/log.c -@@ -39,7 +39,7 @@ static int nftnl_expr_log_set(struct nftnl_expr *e, uint16_t type, - switch(type) { - case NFTNL_EXPR_LOG_PREFIX: - if (log->flags & (1 << NFTNL_EXPR_LOG_PREFIX)) -- xfree(log->prefix); -+ nftnl_xfree(log->prefix); - - log->prefix = strdup(data); - if (!log->prefix) -@@ -155,7 +155,7 @@ nftnl_expr_log_parse(struct nftnl_expr *e, struct nlattr *attr) - - if (tb[NFTA_LOG_PREFIX]) { - if (log->prefix) -- xfree(log->prefix); -+ nftnl_xfree(log->prefix); - - log->prefix = strdup(mnl_attr_get_str(tb[NFTA_LOG_PREFIX])); - if (!log->prefix) -@@ -255,7 +255,7 @@ static void nftnl_expr_log_free(const struct nftnl_expr *e) - { - struct nftnl_expr_log *log = nftnl_expr_data(e); - -- xfree(log->prefix); -+ nftnl_xfree(log->prefix); - } - - struct expr_ops expr_ops_log = { -diff --git a/src/expr/lookup.c b/src/expr/lookup.c -index a495ac0fdcfc..4fce24288c57 100644 ---- a/src/expr/lookup.c -+++ b/src/expr/lookup.c -@@ -209,7 +209,7 @@ static void nftnl_expr_lookup_free(const struct nftnl_expr *e) - { - struct nftnl_expr_lookup *lookup = nftnl_expr_data(e); - -- xfree(lookup->set_name); -+ nftnl_xfree(lookup->set_name); - } - - struct expr_ops expr_ops_lookup = { -diff --git a/src/expr/match.c b/src/expr/match.c -index 4fa74b2da893..7ee706753b68 100644 ---- a/src/expr/match.c -+++ b/src/expr/match.c -@@ -50,7 +50,7 @@ nftnl_expr_match_set(struct nftnl_expr *e, uint16_t type, - break; - case NFTNL_EXPR_MT_INFO: - if (e->flags & (1 << NFTNL_EXPR_MT_INFO)) -- xfree(mt->data); -+ nftnl_xfree(mt->data); - - mt->data = data; - mt->data_len = data_len; -@@ -147,7 +147,7 @@ static int nftnl_expr_match_parse(struct nftnl_expr *e, struct nlattr *attr) - void *match_data; - - if (e->flags & (1 << NFTNL_EXPR_MT_INFO)) -- xfree(match->data); -+ nftnl_xfree(match->data); - - match_data = calloc(1, len); - if (match_data == NULL) -@@ -186,7 +186,7 @@ static void nftnl_expr_match_free(const struct nftnl_expr *e) - { - struct nftnl_expr_match *match = nftnl_expr_data(e); - -- xfree(match->data); -+ nftnl_xfree(match->data); - } - - struct expr_ops expr_ops_match = { -diff --git a/src/expr/target.c b/src/expr/target.c -index 91000386704a..5d0763edf63f 100644 ---- a/src/expr/target.c -+++ b/src/expr/target.c -@@ -50,7 +50,7 @@ nftnl_expr_target_set(struct nftnl_expr *e, uint16_t type, - break; - case NFTNL_EXPR_TG_INFO: - if (e->flags & (1 << NFTNL_EXPR_TG_INFO)) -- xfree(tg->data); -+ nftnl_xfree(tg->data); - - tg->data = data; - tg->data_len = data_len; -@@ -147,7 +147,7 @@ static int nftnl_expr_target_parse(struct nftnl_expr *e, struct nlattr *attr) - void *target_data; - - if (target->data) -- xfree(target->data); -+ nftnl_xfree(target->data); - - target_data = calloc(1, len); - if (target_data == NULL) -@@ -186,7 +186,7 @@ static void nftnl_expr_target_free(const struct nftnl_expr *e) - { - struct nftnl_expr_target *target = nftnl_expr_data(e); - -- xfree(target->data); -+ nftnl_xfree(target->data); - } - - struct expr_ops expr_ops_target = { -diff --git a/src/flowtable.c b/src/flowtable.c -index 1f7ba3052d4f..7f3f6bbcfd13 100644 ---- a/src/flowtable.c -+++ b/src/flowtable.c -@@ -45,16 +45,16 @@ void nftnl_flowtable_free(const struct nftnl_flowtable *c) - int i; - - if (c->flags & (1 << NFTNL_FLOWTABLE_NAME)) -- xfree(c->name); -+ nftnl_xfree(c->name); - if (c->flags & (1 << NFTNL_FLOWTABLE_TABLE)) -- xfree(c->table); -+ nftnl_xfree(c->table); - if (c->flags & (1 << NFTNL_FLOWTABLE_DEVICES)) { - for (i = 0; i < c->dev_array_len; i++) -- xfree(c->dev_array[i]); -+ nftnl_xfree(c->dev_array[i]); - -- xfree(c->dev_array); -+ nftnl_xfree(c->dev_array); - } -- xfree(c); -+ nftnl_xfree(c); - } - EXPORT_SYMBOL(nftnl_flowtable_free); - -@@ -73,10 +73,10 @@ void nftnl_flowtable_unset(struct nftnl_flowtable *c, uint16_t attr) - - switch (attr) { - case NFTNL_FLOWTABLE_NAME: -- xfree(c->name); -+ nftnl_xfree(c->name); - break; - case NFTNL_FLOWTABLE_TABLE: -- xfree(c->table); -+ nftnl_xfree(c->table); - break; - case NFTNL_FLOWTABLE_HOOKNUM: - case NFTNL_FLOWTABLE_PRIO: -@@ -86,8 +86,8 @@ void nftnl_flowtable_unset(struct nftnl_flowtable *c, uint16_t attr) - break; - case NFTNL_FLOWTABLE_DEVICES: - for (i = 0; i < c->dev_array_len; i++) -- xfree(c->dev_array[i]); -- xfree(c->dev_array); -+ nftnl_xfree(c->dev_array[i]); -+ nftnl_xfree(c->dev_array); - break; - default: - return; -@@ -116,7 +116,7 @@ int nftnl_flowtable_set_data(struct nftnl_flowtable *c, uint16_t attr, - switch(attr) { - case NFTNL_FLOWTABLE_NAME: - if (c->flags & (1 << NFTNL_FLOWTABLE_NAME)) -- xfree(c->name); -+ nftnl_xfree(c->name); - - c->name = strdup(data); - if (!c->name) -@@ -124,7 +124,7 @@ int nftnl_flowtable_set_data(struct nftnl_flowtable *c, uint16_t attr, - break; - case NFTNL_FLOWTABLE_TABLE: - if (c->flags & (1 << NFTNL_FLOWTABLE_TABLE)) -- xfree(c->table); -+ nftnl_xfree(c->table); - - c->table = strdup(data); - if (!c->table) -@@ -146,8 +146,8 @@ int nftnl_flowtable_set_data(struct nftnl_flowtable *c, uint16_t attr, - - if (c->flags & (1 << NFTNL_FLOWTABLE_DEVICES)) { - for (i = 0; i < c->dev_array_len; i++) -- xfree(c->dev_array[i]); -- xfree(c->dev_array); -+ nftnl_xfree(c->dev_array[i]); -+ nftnl_xfree(c->dev_array); - } - - c->dev_array = calloc(len + 1, sizeof(char *)); -@@ -385,7 +385,7 @@ static int nftnl_flowtable_parse_devs(struct nlattr *nest, - return 0; - err: - while (len--) -- xfree(dev_array[len]); -+ nftnl_xfree(dev_array[len]); - return -1; - } - -@@ -426,7 +426,7 @@ int nftnl_flowtable_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_flowtab - - if (tb[NFTA_FLOWTABLE_NAME]) { - if (c->flags & (1 << NFTNL_FLOWTABLE_NAME)) -- xfree(c->name); -+ nftnl_xfree(c->name); - c->name = strdup(mnl_attr_get_str(tb[NFTA_FLOWTABLE_NAME])); - if (!c->name) - return -1; -@@ -434,7 +434,7 @@ int nftnl_flowtable_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_flowtab - } - if (tb[NFTA_FLOWTABLE_TABLE]) { - if (c->flags & (1 << NFTNL_FLOWTABLE_TABLE)) -- xfree(c->table); -+ nftnl_xfree(c->table); - c->table = strdup(mnl_attr_get_str(tb[NFTA_FLOWTABLE_TABLE])); - if (!c->table) - return -1; -@@ -638,7 +638,7 @@ void nftnl_flowtable_list_free(struct nftnl_flowtable_list *list) - list_del(&s->head); - nftnl_flowtable_free(s); - } -- xfree(list); -+ nftnl_xfree(list); - } - EXPORT_SYMBOL(nftnl_flowtable_list_free); - -diff --git a/src/gen.c b/src/gen.c -index 1fc909930d86..c69f6f87deae 100644 ---- a/src/gen.c -+++ b/src/gen.c -@@ -38,7 +38,7 @@ struct nftnl_gen *nftnl_gen_alloc(void) - EXPORT_SYMBOL(nftnl_gen_free); - void nftnl_gen_free(const struct nftnl_gen *gen) - { -- xfree(gen); -+ nftnl_xfree(gen); - } - - EXPORT_SYMBOL(nftnl_gen_is_set); -diff --git a/src/object.c b/src/object.c -index 5c8d1835ca97..1de1b35d2217 100644 ---- a/src/object.c -+++ b/src/object.c -@@ -53,11 +53,11 @@ EXPORT_SYMBOL(nftnl_obj_free); - void nftnl_obj_free(const struct nftnl_obj *obj) - { - if (obj->flags & (1 << NFTNL_OBJ_TABLE)) -- xfree(obj->table); -+ nftnl_xfree(obj->table); - if (obj->flags & (1 << NFTNL_OBJ_NAME)) -- xfree(obj->name); -+ nftnl_xfree(obj->name); - -- xfree(obj); -+ nftnl_xfree(obj); - } - - EXPORT_SYMBOL(nftnl_obj_is_set); -@@ -81,11 +81,11 @@ void nftnl_obj_set_data(struct nftnl_obj *obj, uint16_t attr, - - switch (attr) { - case NFTNL_OBJ_TABLE: -- xfree(obj->table); -+ nftnl_xfree(obj->table); - obj->table = strdup(data); - break; - case NFTNL_OBJ_NAME: -- xfree(obj->name); -+ nftnl_xfree(obj->name); - obj->name = strdup(data); - break; - case NFTNL_OBJ_TYPE: -@@ -452,7 +452,7 @@ void nftnl_obj_list_free(struct nftnl_obj_list *list) - list_del(&r->head); - nftnl_obj_free(r); - } -- xfree(list); -+ nftnl_xfree(list); - } - - EXPORT_SYMBOL(nftnl_obj_list_is_empty); -@@ -539,5 +539,5 @@ struct nftnl_obj *nftnl_obj_list_iter_next(struct nftnl_obj_list_iter *iter) - EXPORT_SYMBOL(nftnl_obj_list_iter_destroy); - void nftnl_obj_list_iter_destroy(struct nftnl_obj_list_iter *iter) - { -- xfree(iter); -+ nftnl_xfree(iter); - } -diff --git a/src/rule.c b/src/rule.c -index 8173fcdd863d..36446de29dbe 100644 ---- a/src/rule.c -+++ b/src/rule.c -@@ -53,13 +53,13 @@ void nftnl_rule_free(const struct nftnl_rule *r) - nftnl_expr_free(e); - - if (r->flags & (1 << (NFTNL_RULE_TABLE))) -- xfree(r->table); -+ nftnl_xfree(r->table); - if (r->flags & (1 << (NFTNL_RULE_CHAIN))) -- xfree(r->chain); -+ nftnl_xfree(r->chain); - if (r->flags & (1 << (NFTNL_RULE_USERDATA))) -- xfree(r->user.data); -+ nftnl_xfree(r->user.data); - -- xfree(r); -+ nftnl_xfree(r); - } - - EXPORT_SYMBOL(nftnl_rule_is_set); -@@ -76,10 +76,10 @@ void nftnl_rule_unset(struct nftnl_rule *r, uint16_t attr) - - switch (attr) { - case NFTNL_RULE_TABLE: -- xfree(r->table); -+ nftnl_xfree(r->table); - break; - case NFTNL_RULE_CHAIN: -- xfree(r->chain); -+ nftnl_xfree(r->chain); - break; - case NFTNL_RULE_HANDLE: - case NFTNL_RULE_COMPAT_PROTO: -@@ -90,7 +90,7 @@ void nftnl_rule_unset(struct nftnl_rule *r, uint16_t attr) - case NFTNL_RULE_POSITION_ID: - break; - case NFTNL_RULE_USERDATA: -- xfree(r->user.data); -+ nftnl_xfree(r->user.data); - break; - } - -@@ -117,7 +117,7 @@ int nftnl_rule_set_data(struct nftnl_rule *r, uint16_t attr, - switch(attr) { - case NFTNL_RULE_TABLE: - if (r->flags & (1 << NFTNL_RULE_TABLE)) -- xfree(r->table); -+ nftnl_xfree(r->table); - - r->table = strdup(data); - if (!r->table) -@@ -125,7 +125,7 @@ int nftnl_rule_set_data(struct nftnl_rule *r, uint16_t attr, - break; - case NFTNL_RULE_CHAIN: - if (r->flags & (1 << NFTNL_RULE_CHAIN)) -- xfree(r->chain); -+ nftnl_xfree(r->chain); - - r->chain = strdup(data); - if (!r->chain) -@@ -148,7 +148,7 @@ int nftnl_rule_set_data(struct nftnl_rule *r, uint16_t attr, - break; - case NFTNL_RULE_USERDATA: - if (r->flags & (1 << NFTNL_RULE_USERDATA)) -- xfree(r->user.data); -+ nftnl_xfree(r->user.data); - - r->user.data = malloc(data_len); - if (!r->user.data) -@@ -442,7 +442,7 @@ int nftnl_rule_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_rule *r) - - if (tb[NFTA_RULE_TABLE]) { - if (r->flags & (1 << NFTNL_RULE_TABLE)) -- xfree(r->table); -+ nftnl_xfree(r->table); - r->table = strdup(mnl_attr_get_str(tb[NFTA_RULE_TABLE])); - if (!r->table) - return -1; -@@ -450,7 +450,7 @@ int nftnl_rule_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_rule *r) - } - if (tb[NFTA_RULE_CHAIN]) { - if (r->flags & (1 << NFTNL_RULE_CHAIN)) -- xfree(r->chain); -+ nftnl_xfree(r->chain); - r->chain = strdup(mnl_attr_get_str(tb[NFTA_RULE_CHAIN])); - if (!r->chain) - return -1; -@@ -479,7 +479,7 @@ int nftnl_rule_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_rule *r) - mnl_attr_get_payload(tb[NFTA_RULE_USERDATA]); - - if (r->flags & (1 << NFTNL_RULE_USERDATA)) -- xfree(r->user.data); -+ nftnl_xfree(r->user.data); - - r->user.len = mnl_attr_get_payload_len(tb[NFTA_RULE_USERDATA]); - -@@ -735,7 +735,7 @@ struct nftnl_expr *nftnl_expr_iter_next(struct nftnl_expr_iter *iter) - EXPORT_SYMBOL(nftnl_expr_iter_destroy); - void nftnl_expr_iter_destroy(struct nftnl_expr_iter *iter) - { -- xfree(iter); -+ nftnl_xfree(iter); - } - - struct nftnl_rule_list { -@@ -765,7 +765,7 @@ void nftnl_rule_list_free(struct nftnl_rule_list *list) - list_del(&r->head); - nftnl_rule_free(r); - } -- xfree(list); -+ nftnl_xfree(list); - } - - EXPORT_SYMBOL(nftnl_rule_list_is_empty); -@@ -863,5 +863,5 @@ struct nftnl_rule *nftnl_rule_list_iter_next(struct nftnl_rule_list_iter *iter) - EXPORT_SYMBOL(nftnl_rule_list_iter_destroy); - void nftnl_rule_list_iter_destroy(const struct nftnl_rule_list_iter *iter) - { -- xfree(iter); -+ nftnl_xfree(iter); - } -diff --git a/src/ruleset.c b/src/ruleset.c -index 2468bd46cd5d..16059a305309 100644 ---- a/src/ruleset.c -+++ b/src/ruleset.c -@@ -70,7 +70,7 @@ void nftnl_ruleset_free(const struct nftnl_ruleset *r) - nftnl_set_list_free(r->set_list); - if (r->flags & (1 << NFTNL_RULESET_RULELIST)) - nftnl_rule_list_free(r->rule_list); -- xfree(r); -+ nftnl_xfree(r); - } - - EXPORT_SYMBOL(nftnl_ruleset_is_set); -diff --git a/src/set.c b/src/set.c -index d1bdb165ab4b..53e54715d4b8 100644 ---- a/src/set.c -+++ b/src/set.c -@@ -46,17 +46,17 @@ void nftnl_set_free(const struct nftnl_set *s) - struct nftnl_set_elem *elem, *tmp; - - if (s->flags & (1 << NFTNL_SET_TABLE)) -- xfree(s->table); -+ nftnl_xfree(s->table); - if (s->flags & (1 << NFTNL_SET_NAME)) -- xfree(s->name); -+ nftnl_xfree(s->name); - if (s->flags & (1 << NFTNL_SET_USERDATA)) -- xfree(s->user.data); -+ nftnl_xfree(s->user.data); - - list_for_each_entry_safe(elem, tmp, &s->element_list, head) { - list_del(&elem->head); - nftnl_set_elem_free(elem); - } -- xfree(s); -+ nftnl_xfree(s); - } - - EXPORT_SYMBOL(nftnl_set_is_set); -@@ -73,10 +73,10 @@ void nftnl_set_unset(struct nftnl_set *s, uint16_t attr) - - switch (attr) { - case NFTNL_SET_TABLE: -- xfree(s->table); -+ nftnl_xfree(s->table); - break; - case NFTNL_SET_NAME: -- xfree(s->name); -+ nftnl_xfree(s->name); - break; - case NFTNL_SET_HANDLE: - case NFTNL_SET_FLAGS: -@@ -93,7 +93,7 @@ void nftnl_set_unset(struct nftnl_set *s, uint16_t attr) - case NFTNL_SET_GC_INTERVAL: - break; - case NFTNL_SET_USERDATA: -- xfree(s->user.data); -+ nftnl_xfree(s->user.data); - break; - default: - return; -@@ -127,7 +127,7 @@ int nftnl_set_set_data(struct nftnl_set *s, uint16_t attr, const void *data, - switch(attr) { - case NFTNL_SET_TABLE: - if (s->flags & (1 << NFTNL_SET_TABLE)) -- xfree(s->table); -+ nftnl_xfree(s->table); - - s->table = strdup(data); - if (!s->table) -@@ -135,7 +135,7 @@ int nftnl_set_set_data(struct nftnl_set *s, uint16_t attr, const void *data, - break; - case NFTNL_SET_NAME: - if (s->flags & (1 << NFTNL_SET_NAME)) -- xfree(s->name); -+ nftnl_xfree(s->name); - - s->name = strdup(data); - if (!s->name) -@@ -182,7 +182,7 @@ int nftnl_set_set_data(struct nftnl_set *s, uint16_t attr, const void *data, - break; - case NFTNL_SET_USERDATA: - if (s->flags & (1 << NFTNL_SET_USERDATA)) -- xfree(s->user.data); -+ nftnl_xfree(s->user.data); - - s->user.data = malloc(data_len); - if (!s->user.data) -@@ -492,7 +492,7 @@ int nftnl_set_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_set *s) - - if (tb[NFTA_SET_TABLE]) { - if (s->flags & (1 << NFTNL_SET_TABLE)) -- xfree(s->table); -+ nftnl_xfree(s->table); - s->table = strdup(mnl_attr_get_str(tb[NFTA_SET_TABLE])); - if (!s->table) - return -1; -@@ -500,7 +500,7 @@ int nftnl_set_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_set *s) - } - if (tb[NFTA_SET_NAME]) { - if (s->flags & (1 << NFTNL_SET_NAME)) -- xfree(s->name); -+ nftnl_xfree(s->name); - s->name = strdup(mnl_attr_get_str(tb[NFTA_SET_NAME])); - if (!s->name) - return -1; -@@ -742,7 +742,7 @@ void nftnl_set_list_free(struct nftnl_set_list *list) - list_del(&s->head); - nftnl_set_free(s); - } -- xfree(list); -+ nftnl_xfree(list); - } - - EXPORT_SYMBOL(nftnl_set_list_is_empty); -@@ -834,7 +834,7 @@ struct nftnl_set *nftnl_set_list_iter_next(struct nftnl_set_list_iter *iter) - EXPORT_SYMBOL(nftnl_set_list_iter_destroy); - void nftnl_set_list_iter_destroy(const struct nftnl_set_list_iter *iter) - { -- xfree(iter); -+ nftnl_xfree(iter); - } - - static struct nftnl_set *nftnl_set_lookup(const char *this_set_name, -diff --git a/src/set_elem.c b/src/set_elem.c -index ff983a67d62a..fac96cd368f1 100644 ---- a/src/set_elem.c -+++ b/src/set_elem.c -@@ -43,18 +43,18 @@ EXPORT_SYMBOL(nftnl_set_elem_free); - void nftnl_set_elem_free(struct nftnl_set_elem *s) - { - if (s->flags & (1 << NFTNL_SET_ELEM_CHAIN)) -- xfree(s->data.chain); -+ nftnl_xfree(s->data.chain); - - if (s->flags & (1 << NFTNL_SET_ELEM_EXPR)) - nftnl_expr_free(s->expr); - - if (s->flags & (1 << NFTNL_SET_ELEM_USERDATA)) -- xfree(s->user.data); -+ nftnl_xfree(s->user.data); - - if (s->flags & (1 << NFTNL_SET_ELEM_OBJREF)) -- xfree(s->objref); -+ nftnl_xfree(s->objref); - -- xfree(s); -+ nftnl_xfree(s); - } - - EXPORT_SYMBOL(nftnl_set_elem_is_set); -@@ -71,7 +71,7 @@ void nftnl_set_elem_unset(struct nftnl_set_elem *s, uint16_t attr) - - switch (attr) { - case NFTNL_SET_ELEM_CHAIN: -- xfree(s->data.chain); -+ nftnl_xfree(s->data.chain); - break; - case NFTNL_SET_ELEM_FLAGS: - case NFTNL_SET_ELEM_KEY: /* NFTA_SET_ELEM_KEY */ -@@ -81,13 +81,13 @@ void nftnl_set_elem_unset(struct nftnl_set_elem *s, uint16_t attr) - case NFTNL_SET_ELEM_EXPIRATION: /* NFTA_SET_ELEM_EXPIRATION */ - break; - case NFTNL_SET_ELEM_USERDATA: /* NFTA_SET_ELEM_USERDATA */ -- xfree(s->user.data); -+ nftnl_xfree(s->user.data); - break; - case NFTNL_SET_ELEM_EXPR: - nftnl_expr_free(s->expr); - break; - case NFTNL_SET_ELEM_OBJREF: -- xfree(s->objref); -+ nftnl_xfree(s->objref); - break; - default: - return; -@@ -113,7 +113,7 @@ int nftnl_set_elem_set(struct nftnl_set_elem *s, uint16_t attr, - break; - case NFTNL_SET_ELEM_CHAIN: /* NFTA_SET_ELEM_DATA */ - if (s->flags & (1 << NFTNL_SET_ELEM_CHAIN)) -- xfree(s->data.chain); -+ nftnl_xfree(s->data.chain); - - s->data.chain = strdup(data); - if (!s->data.chain) -@@ -128,7 +128,7 @@ int nftnl_set_elem_set(struct nftnl_set_elem *s, uint16_t attr, - break; - case NFTNL_SET_ELEM_USERDATA: /* NFTA_SET_ELEM_USERDATA */ - if (s->flags & (1 << NFTNL_SET_ELEM_USERDATA)) -- xfree(s->user.data); -+ nftnl_xfree(s->user.data); - - s->user.data = malloc(data_len); - if (!s->user.data) -@@ -138,7 +138,7 @@ int nftnl_set_elem_set(struct nftnl_set_elem *s, uint16_t attr, - break; - case NFTNL_SET_ELEM_OBJREF: - if (s->flags & (1 << NFTNL_SET_ELEM_OBJREF)) -- xfree(s->objref); -+ nftnl_xfree(s->objref); - - s->objref = strdup(data); - if (!s->objref) -@@ -436,7 +436,7 @@ static int nftnl_set_elems_parse2(struct nftnl_set *s, const struct nlattr *nest - mnl_attr_get_payload(tb[NFTA_SET_ELEM_USERDATA]); - - if (e->flags & (1 << NFTNL_RULE_USERDATA)) -- xfree(e->user.data); -+ nftnl_xfree(e->user.data); - - e->user.len = mnl_attr_get_payload_len(tb[NFTA_SET_ELEM_USERDATA]); - e->user.data = malloc(e->user.len); -@@ -521,7 +521,7 @@ int nftnl_set_elems_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_set *s) - - if (tb[NFTA_SET_ELEM_LIST_TABLE]) { - if (s->flags & (1 << NFTNL_SET_TABLE)) -- xfree(s->table); -+ nftnl_xfree(s->table); - s->table = - strdup(mnl_attr_get_str(tb[NFTA_SET_ELEM_LIST_TABLE])); - if (!s->table) -@@ -530,7 +530,7 @@ int nftnl_set_elems_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_set *s) - } - if (tb[NFTA_SET_ELEM_LIST_SET]) { - if (s->flags & (1 << NFTNL_SET_NAME)) -- xfree(s->name); -+ nftnl_xfree(s->name); - s->name = - strdup(mnl_attr_get_str(tb[NFTA_SET_ELEM_LIST_SET])); - if (!s->name) -@@ -729,7 +729,7 @@ struct nftnl_set_elem *nftnl_set_elems_iter_next(struct nftnl_set_elems_iter *it - EXPORT_SYMBOL(nftnl_set_elems_iter_destroy); - void nftnl_set_elems_iter_destroy(struct nftnl_set_elems_iter *iter) - { -- xfree(iter); -+ nftnl_xfree(iter); - } - - static bool nftnl_attr_nest_overflow(struct nlmsghdr *nlh, -diff --git a/src/table.c b/src/table.c -index 54259eec7d06..888991b1b80d 100644 ---- a/src/table.c -+++ b/src/table.c -@@ -47,9 +47,9 @@ EXPORT_SYMBOL(nftnl_table_free); - void nftnl_table_free(const struct nftnl_table *t) - { - if (t->flags & (1 << NFTNL_TABLE_NAME)) -- xfree(t->name); -+ nftnl_xfree(t->name); - -- xfree(t); -+ nftnl_xfree(t); - } - - EXPORT_SYMBOL(nftnl_table_is_set); -@@ -66,7 +66,7 @@ void nftnl_table_unset(struct nftnl_table *t, uint16_t attr) - - switch (attr) { - case NFTNL_TABLE_NAME: -- xfree(t->name); -+ nftnl_xfree(t->name); - break; - case NFTNL_TABLE_FLAGS: - case NFTNL_TABLE_HANDLE: -@@ -94,7 +94,7 @@ int nftnl_table_set_data(struct nftnl_table *t, uint16_t attr, - switch (attr) { - case NFTNL_TABLE_NAME: - if (t->flags & (1 << NFTNL_TABLE_NAME)) -- xfree(t->name); -+ nftnl_xfree(t->name); - - t->name = strdup(data); - if (!t->name) -@@ -258,7 +258,7 @@ int nftnl_table_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_table *t) - - if (tb[NFTA_TABLE_NAME]) { - if (t->flags & (1 << NFTNL_TABLE_NAME)) -- xfree(t->name); -+ nftnl_xfree(t->name); - t->name = strdup(mnl_attr_get_str(tb[NFTA_TABLE_NAME])); - if (!t->name) - return -1; -@@ -395,7 +395,7 @@ void nftnl_table_list_free(struct nftnl_table_list *list) - list_del(&r->head); - nftnl_table_free(r); - } -- xfree(list); -+ nftnl_xfree(list); - } - - EXPORT_SYMBOL(nftnl_table_list_is_empty); -@@ -481,5 +481,5 @@ struct nftnl_table *nftnl_table_list_iter_next(struct nftnl_table_list_iter *ite - EXPORT_SYMBOL(nftnl_table_list_iter_destroy); - void nftnl_table_list_iter_destroy(const struct nftnl_table_list_iter *iter) - { -- xfree(iter); -+ nftnl_xfree(iter); - } -diff --git a/src/trace.c b/src/trace.c -index f4264377508e..8a18391d83d1 100644 ---- a/src/trace.c -+++ b/src/trace.c -@@ -61,13 +61,13 @@ struct nftnl_trace *nftnl_trace_alloc(void) - EXPORT_SYMBOL(nftnl_trace_free); - void nftnl_trace_free(const struct nftnl_trace *t) - { -- xfree(t->chain); -- xfree(t->table); -- xfree(t->jump_target); -- xfree(t->ll.data); -- xfree(t->nh.data); -- xfree(t->th.data); -- xfree(t); -+ nftnl_xfree(t->chain); -+ nftnl_xfree(t->table); -+ nftnl_xfree(t->jump_target); -+ nftnl_xfree(t->ll.data); -+ nftnl_xfree(t->nh.data); -+ nftnl_xfree(t->th.data); -+ nftnl_xfree(t); - } - - EXPORT_SYMBOL(nftnl_trace_is_set); -diff --git a/src/udata.c b/src/udata.c -index b5a47295b40d..3b3be548036d 100644 ---- a/src/udata.c -+++ b/src/udata.c -@@ -33,7 +33,7 @@ struct nftnl_udata_buf *nftnl_udata_buf_alloc(uint32_t data_size) - EXPORT_SYMBOL(nftnl_udata_buf_free); - void nftnl_udata_buf_free(const struct nftnl_udata_buf *buf) - { -- xfree(buf); -+ nftnl_xfree(buf); - } - - EXPORT_SYMBOL(nftnl_udata_buf_len); -diff --git a/src/utils.c b/src/utils.c -index f641bf93ec68..02e7476a0ced 100644 ---- a/src/utils.c -+++ b/src/utils.c -@@ -304,7 +304,7 @@ int nftnl_fprintf(FILE *fp, const void *obj, uint32_t cmd, uint32_t type, - - out: - if (buf != _buf) -- xfree(buf); -+ nftnl_xfree(buf); - - return ret; - } --- -2.19.1 - -- 2.30.2