diff options
author | Jarek Poplawski <jarkao2@gmail.com> | 2008-03-03 23:49:34 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-03-03 23:49:34 -0500 |
commit | ec9b6add7d81f902f6094e71f595da4a362f3348 (patch) | |
tree | 5636180fcd749cfce604d238357ccc2ff63bb770 | |
parent | c8fff1cf4e4e5e420c929469a09427aa37342928 (diff) |
[PPPOL2TP]: Add missing sock_put() in pppol2tp_tunnel_closeall()
Every skb removed from session->reorder_q needs sock_put().
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Acked-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/pppol2tp.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/pppol2tp.c b/drivers/net/pppol2tp.c index dcd499118b95..86e5dba079fe 100644 --- a/drivers/net/pppol2tp.c +++ b/drivers/net/pppol2tp.c | |||
@@ -1111,6 +1111,8 @@ static void pppol2tp_tunnel_closeall(struct pppol2tp_tunnel *tunnel) | |||
1111 | for (hash = 0; hash < PPPOL2TP_HASH_SIZE; hash++) { | 1111 | for (hash = 0; hash < PPPOL2TP_HASH_SIZE; hash++) { |
1112 | again: | 1112 | again: |
1113 | hlist_for_each_safe(walk, tmp, &tunnel->session_hlist[hash]) { | 1113 | hlist_for_each_safe(walk, tmp, &tunnel->session_hlist[hash]) { |
1114 | struct sk_buff *skb; | ||
1115 | |||
1114 | session = hlist_entry(walk, struct pppol2tp_session, hlist); | 1116 | session = hlist_entry(walk, struct pppol2tp_session, hlist); |
1115 | 1117 | ||
1116 | sk = session->sock; | 1118 | sk = session->sock; |
@@ -1139,7 +1141,10 @@ again: | |||
1139 | /* Purge any queued data */ | 1141 | /* Purge any queued data */ |
1140 | skb_queue_purge(&sk->sk_receive_queue); | 1142 | skb_queue_purge(&sk->sk_receive_queue); |
1141 | skb_queue_purge(&sk->sk_write_queue); | 1143 | skb_queue_purge(&sk->sk_write_queue); |
1142 | skb_queue_purge(&session->reorder_q); | 1144 | while ((skb = skb_dequeue(&session->reorder_q))) { |
1145 | kfree_skb(skb); | ||
1146 | sock_put(sk); | ||
1147 | } | ||
1143 | 1148 | ||
1144 | release_sock(sk); | 1149 | release_sock(sk); |
1145 | sock_put(sk); | 1150 | sock_put(sk); |