summaryrefslogtreecommitdiffstats
path: root/kernel/net/dccp/proto.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/net/dccp/proto.c')
-rw-r--r--kernel/net/dccp/proto.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/net/dccp/proto.c b/kernel/net/dccp/proto.c
index 41e65804d..9fe25bf63 100644
--- a/kernel/net/dccp/proto.c
+++ b/kernel/net/dccp/proto.c
@@ -1009,6 +1009,10 @@ void dccp_close(struct sock *sk, long timeout)
__kfree_skb(skb);
}
+ /* If socket has been already reset kill it. */
+ if (sk->sk_state == DCCP_CLOSED)
+ goto adjudge_to_death;
+
if (data_was_unread) {
/* Unread data was tossed, send an appropriate Reset Code */
DCCP_WARN("ABORT with %u bytes unread\n", data_was_unread);