ppp: fix pptp double release_sock in pptp_bind()
authorDjalal Harouni <tixxdz@opendz.org>
Tue, 6 Dec 2011 15:47:12 +0000 (15:47 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 Dec 2011 18:29:04 +0000 (13:29 -0500)
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>
drivers/net/ppp/pptp.c

index 89f829f5f7257fcacd54902d3963520ab5b47525..f8a6853b692ed3edf29e996739d70261988bc80b 100644 (file)
@@ -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;