summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDjalal Harouni <tixxdz@opendz.org>2011-12-06 15:47:12 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2012-01-06 14:17:26 -0800
commit9bf78b2e47083ebf3363c7017cbcda8bb9ceb30b (patch)
treee766ba43916ba1b92c7f3a58ccc0a74f2ee9658e
parentb8b7320109c5fc492688d63fc3089fd0868a0aa1 (diff)
ppp: fix pptp double release_sock in pptp_bind()
[ Upstream commit a454daceb78844a09c08b6e2d8badcb76a5d73b9 ] Signed-off-by: Djalal Harouni <tixxdz@opendz.org> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/net/pptp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/pptp.c b/drivers/net/pptp.c
index 89f829f5f725..f8a6853b692e 100644
--- a/drivers/net/pptp.c
+++ b/drivers/net/pptp.c
@@ -423,10 +423,8 @@ static int pptp_bind(struct socket *sock, struct sockaddr *uservaddr,
lock_sock(sk);
opt->src_addr = sp->sa_addr.pptp;
- if (add_chan(po)) {
- release_sock(sk);
+ if (add_chan(po))
error = -EBUSY;
- }
release_sock(sk);
return error;