diff options
-rw-r--r-- | net/ax25/ax25_subr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ax25/ax25_subr.c b/net/ax25/ax25_subr.c index 4855d18..038b109 100644 --- a/net/ax25/ax25_subr.c +++ b/net/ax25/ax25_subr.c @@ -264,7 +264,7 @@ void ax25_disconnect(ax25_cb *ax25, int reason) { ax25_clear_queues(ax25); - if (!sock_flag(ax25->sk, SOCK_DESTROY)) + if (!ax25->sk || !sock_flag(ax25->sk, SOCK_DESTROY)) ax25_stop_heartbeat(ax25); ax25_stop_t1timer(ax25); ax25_stop_t2timer(ax25); |