|
@@ -2072,7 +2072,7 @@ static int nf_tables_dump_rules(struct sk_buff *skb,
|
|
continue;
|
|
continue;
|
|
|
|
|
|
list_for_each_entry_rcu(chain, &table->chains, list) {
|
|
list_for_each_entry_rcu(chain, &table->chains, list) {
|
|
- if (ctx && ctx->chain[0] &&
|
|
|
|
|
|
+ if (ctx && ctx->chain &&
|
|
strcmp(ctx->chain, chain->name) != 0)
|
|
strcmp(ctx->chain, chain->name) != 0)
|
|
continue;
|
|
continue;
|
|
|
|
|
|
@@ -4665,8 +4665,10 @@ static int nf_tables_dump_obj_done(struct netlink_callback *cb)
|
|
{
|
|
{
|
|
struct nft_obj_filter *filter = cb->data;
|
|
struct nft_obj_filter *filter = cb->data;
|
|
|
|
|
|
- kfree(filter->table);
|
|
|
|
- kfree(filter);
|
|
|
|
|
|
+ if (filter) {
|
|
|
|
+ kfree(filter->table);
|
|
|
|
+ kfree(filter);
|
|
|
|
+ }
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|