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:14:05 -0800
commite2f377870311c6e2ecf77e1ed6bbcb175ce0dde9 (patch)
treeba6f5bdf198c86159668b85d6620df4c55affa35
parentb3c5fb8252b04ec02654f80988e68852f1a14cb5 (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 1286fe212dc4..4b3a68b69a67 100644
--- a/drivers/net/pptp.c
+++ b/drivers/net/pptp.c
@@ -418,10 +418,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;