diff options
author | David S. Miller <davem@davemloft.net> | 2020-08-23 20:48:27 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-08-23 20:48:27 +0200 |
commit | 7611cbb900b4b9a6fe5eca12fb12645c0576a015 (patch) | |
tree | 9c8c8e1fa991e4728d25a19b86c974c8e49ee1b7 /net/netlink | |
parent | Merge branch 'l2tp-replace-custom-logging-code-with-tracepoints' (diff) | |
parent | Merge tag 'powerpc-5.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/po... (diff) | |
download | linux-7611cbb900b4b9a6fe5eca12fb12645c0576a015.tar.xz linux-7611cbb900b4b9a6fe5eca12fb12645c0576a015.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Diffstat (limited to 'net/netlink')
-rw-r--r-- | net/netlink/policy.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/netlink/policy.c b/net/netlink/policy.c index 46c11c9c212a..7b1f50531cd3 100644 --- a/net/netlink/policy.c +++ b/net/netlink/policy.c @@ -51,6 +51,9 @@ static int add_policy(struct nl_policy_dump **statep, if (!state) return -ENOMEM; + memset(&state->policies[state->n_alloc], 0, + flex_array_size(state, policies, n_alloc - state->n_alloc)); + state->policies[state->n_alloc].policy = policy; state->policies[state->n_alloc].maxtype = maxtype; state->n_alloc = n_alloc; |