diff options
author | David S. Miller | 2020-08-23 11:48:27 -0700 |
---|---|---|
committer | David S. Miller | 2020-08-23 11:48:27 -0700 |
commit | 7611cbb900b4b9a6fe5eca12fb12645c0576a015 (patch) | |
tree | 9c8c8e1fa991e4728d25a19b86c974c8e49ee1b7 /net/netlink | |
parent | d7223aa5867134b9923b42e1245801bd790a1d8c (diff) | |
parent | cb95712138ec5e480db5160b41172bbc6f6494cc (diff) |
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; |