summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorDjalal Harouni <tixxdz@opendz.org>2011-12-06 15:47:12 +0000
committerDavid S. Miller <davem@davemloft.net>2011-12-07 13:29:04 -0500
commita454daceb78844a09c08b6e2d8badcb76a5d73b9 (patch)
tree3bc74f2daa28e775392225d189857cff7673d312 /drivers/net
parent43af940c54d712ab5e6d6798a82498b25c2af299 (diff)
downloadlinux-a454daceb78844a09c08b6e2d8badcb76a5d73b9.tar.bz2
ppp: fix pptp double release_sock in pptp_bind()
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>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ppp/pptp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ppp/pptp.c b/drivers/net/ppp/pptp.c
index 89f829f5f725..f8a6853b692e 100644
--- a/drivers/net/ppp/pptp.c
+++ b/drivers/net/ppp/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;