]> Pileus Git - ~andy/linux/blobdiff - net/ipv6/tcp_ipv6.c
ALSA: usb-audio: fix invalid length check for RME and other UAC 2 devices
[~andy/linux] / net / ipv6 / tcp_ipv6.c
index 6565cf55eb1e80f9109502995319655147bd1fd7..93825dd3a7c070be4dd1e294a155b409525337e2 100644 (file)
@@ -1288,7 +1288,8 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
 #endif
 
        if (__inet_inherit_port(sk, newsk) < 0) {
-               sock_put(newsk);
+               inet_csk_prepare_forced_close(newsk);
+               tcp_done(newsk);
                goto out;
        }
        __inet6_hash(newsk, NULL);