diff options
Diffstat (limited to 'net/ax25')
-rw-r--r-- | net/ax25/ax25_std_timer.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/ax25/ax25_std_timer.c b/net/ax25/ax25_std_timer.c index 96e4b9273250..cdc7e751ef36 100644 --- a/net/ax25/ax25_std_timer.c +++ b/net/ax25/ax25_std_timer.c | |||
@@ -39,11 +39,9 @@ void ax25_std_heartbeat_expiry(ax25_cb *ax25) | |||
39 | 39 | ||
40 | switch (ax25->state) { | 40 | switch (ax25->state) { |
41 | case AX25_STATE_0: | 41 | case AX25_STATE_0: |
42 | /* Magic here: If we listen() and a new link dies before it | 42 | if (!sk || |
43 | is accepted() it isn't 'dead' so doesn't get removed. */ | 43 | sock_flag(sk, SOCK_DESTROY) || |
44 | if (!sk || sock_flag(sk, SOCK_DESTROY) || | 44 | sock_flag(sk, SOCK_DEAD)) { |
45 | (sk->sk_state == TCP_LISTEN && | ||
46 | sock_flag(sk, SOCK_DEAD))) { | ||
47 | if (sk) { | 45 | if (sk) { |
48 | sock_hold(sk); | 46 | sock_hold(sk); |
49 | ax25_destroy_socket(ax25); | 47 | ax25_destroy_socket(ax25); |