X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?p=kvmfornfv.git;a=blobdiff_plain;f=kernel%2Fnet%2Fax25%2Fax25_subr.c;h=983f0b5e14f1fafa4802f9c2763b363e30dcb659;hp=3b78e8473a01b4a82e376266b04078e714ce1e26;hb=52f993b8e89487ec9ee15a7fb4979e0f09a45b27;hpb=c189ccac5702322ed843fe17057035b7222a59b6 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);