summaryrefslogtreecommitdiffstats
path: root/kernel/net/ax25/ax25_subr.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/net/ax25/ax25_subr.c')
-rw-r--r--kernel/net/ax25/ax25_subr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/net/ax25/ax25_subr.c b/kernel/net/ax25/ax25_subr.c
index 3b78e8473..983f0b5e1 100644
--- a/kernel/net/ax25/ax25_subr.c
+++ b/kernel/net/ax25/ax25_subr.c
@@ -264,7 +264,8 @@ void ax25_disconnect(ax25_cb *ax25, int reason)
{
ax25_clear_queues(ax25);
- ax25_stop_heartbeat(ax25);
+ if (!ax25->sk || !sock_flag(ax25->sk, SOCK_DESTROY))
+ ax25_stop_heartbeat(ax25);
ax25_stop_t1timer(ax25);
ax25_stop_t2timer(ax25);
ax25_stop_t3timer(ax25);