Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 97684
b: refs/heads/master
c: 199f7d2
h: refs/heads/master
v: v3
  • Loading branch information
James Chapman authored and David S. Miller committed Jun 4, 2008
1 parent 135a3f5 commit d871094
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b4496d44c6bd8b2da8d370ef49c4b008ce82370b
refs/heads/master: 199f7d24ae59894243687a234a909f44a8724506
10 changes: 10 additions & 0 deletions trunk/drivers/net/pppol2tp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1279,6 +1279,7 @@ static void pppol2tp_session_destruct(struct sock *sk)
static int pppol2tp_release(struct socket *sock)
{
struct sock *sk = sock->sk;
struct pppol2tp_session *session;
int error;

if (!sk)
Expand All @@ -1296,9 +1297,18 @@ static int pppol2tp_release(struct socket *sock)
sock_orphan(sk);
sock->sk = NULL;

session = pppol2tp_sock_to_session(sk);

/* Purge any queued data */
skb_queue_purge(&sk->sk_receive_queue);
skb_queue_purge(&sk->sk_write_queue);
if (session != NULL) {
struct sk_buff *skb;
while ((skb = skb_dequeue(&session->reorder_q))) {
kfree_skb(skb);
sock_put(sk);
}
}

release_sock(sk);

Expand Down

0 comments on commit d871094

Please sign in to comment.