Message ID | 20240222000843.146665-6-pablo@netfilter.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 195e5f88c2e48330ba5483e0bad2de3b3fad484f |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net,1/5] netfilter: nf_tables: set dormant flag on hook register failure | expand |
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index 485e047d5f98..7e938c7397dd 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -2082,7 +2082,7 @@ static struct nft_hook *nft_netdev_hook_alloc(struct net *net, struct nft_hook *hook; int err; - hook = kmalloc(sizeof(struct nft_hook), GFP_KERNEL_ACCOUNT); + hook = kzalloc(sizeof(struct nft_hook), GFP_KERNEL_ACCOUNT); if (!hook) { err = -ENOMEM; goto err_hook_alloc;