From: Djalal Harouni Date: Tue, 6 Dec 2011 15:47:12 +0000 (+0000) Subject: ppp: fix pptp double release_sock in pptp_bind() X-Git-Tag: firefly_0821_release~7541^2~2036 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e2f377870311c6e2ecf77e1ed6bbcb175ce0dde9;p=firefly-linux-kernel-4.4.55.git ppp: fix pptp double release_sock in pptp_bind() [ Upstream commit a454daceb78844a09c08b6e2d8badcb76a5d73b9 ] Signed-off-by: Djalal Harouni Acked-by: Eric Dumazet Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- 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;