]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ax25/ax25_std_timer.c
ax25: Fix std timer socket destroy handling.
[linux-2.6-omap-h63xx.git] / net / ax25 / ax25_std_timer.c
index 96e4b9273250918b4a60fdcc9ccce00b79090827..cdc7e751ef36129fc9e25f107d8beb1e58034faf 100644 (file)
@@ -39,11 +39,9 @@ void ax25_std_heartbeat_expiry(ax25_cb *ax25)
 
        switch (ax25->state) {
        case AX25_STATE_0:
-               /* Magic here: If we listen() and a new link dies before it
-                  is accepted() it isn't 'dead' so doesn't get removed. */
-               if (!sk || sock_flag(sk, SOCK_DESTROY) ||
-                   (sk->sk_state == TCP_LISTEN &&
-                    sock_flag(sk, SOCK_DEAD))) {
+               if (!sk ||
+                   sock_flag(sk, SOCK_DESTROY) ||
+                   sock_flag(sk, SOCK_DEAD)) {
                        if (sk) {
                                sock_hold(sk);
                                ax25_destroy_socket(ax25);