summaryrefslogtreecommitdiffstats
path: root/net/netrom/nr_timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/netrom/nr_timer.c')
-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 a8da88db7893..4e7c968cde2d 100644
--- a/net/netrom/nr_timer.c
+++ b/net/netrom/nr_timer.c
@@ -121,6 +121,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;