diff options
author | David S. Miller <davem@davemloft.net> | 2016-09-23 12:46:57 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-09-23 12:46:57 +0200 |
commit | d6989d4bbe6c4d1c2a76696833a07f044e85694d (patch) | |
tree | 2d9a70d0feee4d4a20568be1b39a961fa0d27d81 /net/irda | |
parent | xen-netback: switch to threaded irq for control ring (diff) | |
parent | Merge tag 'media/v4.8-7' of git://git.kernel.org/pub/scm/linux/kernel/git/mch... (diff) | |
download | linux-d6989d4bbe6c4d1c2a76696833a07f044e85694d.tar.xz linux-d6989d4bbe6c4d1c2a76696833a07f044e85694d.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/irda')
-rw-r--r-- | net/irda/af_irda.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c index db639690c205..391c3cbd2eed 100644 --- a/net/irda/af_irda.c +++ b/net/irda/af_irda.c @@ -832,7 +832,7 @@ static int irda_accept(struct socket *sock, struct socket *newsock, int flags) struct sock *sk = sock->sk; struct irda_sock *new, *self = irda_sk(sk); struct sock *newsk; - struct sk_buff *skb; + struct sk_buff *skb = NULL; int err; err = irda_create(sock_net(sk), newsock, sk->sk_protocol, 0); @@ -897,7 +897,6 @@ static int irda_accept(struct socket *sock, struct socket *newsock, int flags) err = -EPERM; /* value does not seem to make sense. -arnd */ if (!new->tsap) { pr_debug("%s(), dup failed!\n", __func__); - kfree_skb(skb); goto out; } @@ -916,7 +915,6 @@ static int irda_accept(struct socket *sock, struct socket *newsock, int flags) /* Clean up the original one to keep it in listen state */ irttp_listen(self->tsap); - kfree_skb(skb); sk->sk_ack_backlog--; newsock->state = SS_CONNECTED; @@ -924,6 +922,7 @@ static int irda_accept(struct socket *sock, struct socket *newsock, int flags) irda_connect_response(new); err = 0; out: + kfree_skb(skb); release_sock(sk); return err; } |