Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 738faca3 authored by Boris Ostrovsky's avatar Boris Ostrovsky Committed by David S. Miller
Browse files

ipv6: Don't pass invalid dst_entry pointer to dst_release().



Make sure dst_release() is not called with error pointer. This is
similar to commit 4910ac6c ("ipv4:
Don't ip_rt_put() an error pointer in RAW sockets.").

Signed-off-by: default avatarBoris Ostrovsky <boris.ostrovsky@amd.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a14b289d
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -503,6 +503,7 @@ static int tcp_v6_send_synack(struct sock *sk, struct request_sock *req,
	dst = ip6_dst_lookup_flow(sk, &fl6, final_p, false);
	dst = ip6_dst_lookup_flow(sk, &fl6, final_p, false);
	if (IS_ERR(dst)) {
	if (IS_ERR(dst)) {
		err = PTR_ERR(dst);
		err = PTR_ERR(dst);
		dst = NULL;
		goto done;
		goto done;
	}
	}
	skb = tcp_make_synack(sk, dst, req, rvp);
	skb = tcp_make_synack(sk, dst, req, rvp);