diff options
-rw-r--r-- | net/netlink/af_netlink.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 5acee49db90b..94a61e602ee7 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c | |||
@@ -691,6 +691,9 @@ static void deferred_put_nlk_sk(struct rcu_head *head) | |||
691 | struct netlink_sock *nlk = container_of(head, struct netlink_sock, rcu); | 691 | struct netlink_sock *nlk = container_of(head, struct netlink_sock, rcu); |
692 | struct sock *sk = &nlk->sk; | 692 | struct sock *sk = &nlk->sk; |
693 | 693 | ||
694 | kfree(nlk->groups); | ||
695 | nlk->groups = NULL; | ||
696 | |||
694 | if (!refcount_dec_and_test(&sk->sk_refcnt)) | 697 | if (!refcount_dec_and_test(&sk->sk_refcnt)) |
695 | return; | 698 | return; |
696 | 699 | ||
@@ -769,9 +772,6 @@ static int netlink_release(struct socket *sock) | |||
769 | netlink_table_ungrab(); | 772 | netlink_table_ungrab(); |
770 | } | 773 | } |
771 | 774 | ||
772 | kfree(nlk->groups); | ||
773 | nlk->groups = NULL; | ||
774 | |||
775 | local_bh_disable(); | 775 | local_bh_disable(); |
776 | sock_prot_inuse_add(sock_net(sk), &netlink_proto, -1); | 776 | sock_prot_inuse_add(sock_net(sk), &netlink_proto, -1); |
777 | local_bh_enable(); | 777 | local_bh_enable(); |