aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_diag.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_diag.c')
-rw-r--r--net/ipv4/tcp_diag.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/ipv4/tcp_diag.c b/net/ipv4/tcp_diag.c
index 4d610934fb39..a748c74aa8b7 100644
--- a/net/ipv4/tcp_diag.c
+++ b/net/ipv4/tcp_diag.c
@@ -54,11 +54,16 @@ static int tcp_diag_destroy(struct sk_buff *in_skb,
54{ 54{
55 struct net *net = sock_net(in_skb->sk); 55 struct net *net = sock_net(in_skb->sk);
56 struct sock *sk = inet_diag_find_one_icsk(net, &tcp_hashinfo, req); 56 struct sock *sk = inet_diag_find_one_icsk(net, &tcp_hashinfo, req);
57 int err;
57 58
58 if (IS_ERR(sk)) 59 if (IS_ERR(sk))
59 return PTR_ERR(sk); 60 return PTR_ERR(sk);
60 61
61 return sock_diag_destroy(sk, ECONNABORTED); 62 err = sock_diag_destroy(sk, ECONNABORTED);
63
64 sock_gen_put(sk);
65
66 return err;
62} 67}
63#endif 68#endif
64 69