Unverified Commit a8767877 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!10172 netrom: Fix a memory leak in nr_heartbeat_expiry()

parents b057ca57 c83d0b12
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -121,6 +121,7 @@ static void nr_heartbeat_expiry(struct timer_list *t)
		   is accepted() it isn't 'dead' so doesn't get removed. */
		if (sock_flag(sk, SOCK_DESTROY) ||
		    (sk->sk_state == TCP_LISTEN && sock_flag(sk, SOCK_DEAD))) {
			if (sk->sk_state == TCP_LISTEN)
				sock_hold(sk);
			bh_unlock_sock(sk);
			nr_destroy_socket(sk);