summaryrefslogtreecommitdiff
path: root/net/ipv4/raw_diag.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/raw_diag.c')
-rw-r--r--net/ipv4/raw_diag.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv4/raw_diag.c b/net/ipv4/raw_diag.c
index be930908bcf9..bf0b8842bf31 100644
--- a/net/ipv4/raw_diag.c
+++ b/net/ipv4/raw_diag.c
@@ -205,11 +205,14 @@ static int raw_diag_destroy(struct sk_buff *in_skb,
{
struct net *net = sock_net(in_skb->sk);
struct sock *sk;
+ int err;
sk = raw_sock_get(net, r);
if (IS_ERR(sk))
return PTR_ERR(sk);
- return sock_diag_destroy(sk, ECONNABORTED);
+ err = sock_diag_destroy(sk, ECONNABORTED);
+ sock_put(sk);
+ return err;
}
#endif