summaryrefslogtreecommitdiffstats
path: root/net/netrom/nr_timer.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--net/netrom/nr_timer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/netrom/nr_timer.c b/net/netrom/nr_timer.c
index 426d49609..2bf99bd5b 100644
--- a/net/netrom/nr_timer.c
+++ b/net/netrom/nr_timer.c
@@ -124,6 +124,7 @@ static void nr_heartbeat_expiry(struct timer_list *t)
is accepted() it isn't 'dead' so doesn't get removed. */
if (sock_flag(sk, SOCK_DESTROY) ||
(sk->sk_state == TCP_LISTEN && sock_flag(sk, SOCK_DEAD))) {
+ sock_hold(sk);
bh_unlock_sock(sk);
nr_destroy_socket(sk);
goto out;