linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / net / x25 / x25_timer.c
index 71ff308..0a92e1d 100644 (file)
@@ -114,9 +114,8 @@ static void x25_heartbeat_expiry(unsigned long param)
                        if (sock_flag(sk, SOCK_DESTROY) ||
                            (sk->sk_state == TCP_LISTEN &&
                             sock_flag(sk, SOCK_DEAD))) {
-                               bh_unlock_sock(sk);
                                x25_destroy_socket(sk);
-                               return;
+                               goto unlock;
                        }
                        break;
 
@@ -129,6 +128,7 @@ static void x25_heartbeat_expiry(unsigned long param)
        }
 restart_heartbeat:
        x25_start_heartbeat(sk);
+unlock:
        bh_unlock_sock(sk);
 }