提交 ec9b6add 编写于 作者: J Jarek Poplawski 提交者: David S. Miller

[PPPOL2TP]: Add missing sock_put() in pppol2tp_tunnel_closeall()

Every skb removed from session->reorder_q needs sock_put().
Signed-off-by: NJarek Poplawski <jarkao2@gmail.com>
Acked-by: NJames Chapman <jchapman@katalix.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c8fff1cf
......@@ -1111,6 +1111,8 @@ static void pppol2tp_tunnel_closeall(struct pppol2tp_tunnel *tunnel)
for (hash = 0; hash < PPPOL2TP_HASH_SIZE; hash++) {
again:
hlist_for_each_safe(walk, tmp, &tunnel->session_hlist[hash]) {
struct sk_buff *skb;
session = hlist_entry(walk, struct pppol2tp_session, hlist);
sk = session->sock;
......@@ -1139,7 +1141,10 @@ static void pppol2tp_tunnel_closeall(struct pppol2tp_tunnel *tunnel)
/* Purge any queued data */
skb_queue_purge(&sk->sk_receive_queue);
skb_queue_purge(&sk->sk_write_queue);
skb_queue_purge(&session->reorder_q);
while ((skb = skb_dequeue(&session->reorder_q))) {
kfree_skb(skb);
sock_put(sk);
}
release_sock(sk);
sock_put(sk);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册