Skip to content

Commit 738faca

Browse files
ostrdavem330
authored andcommitted
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 4910ac6 ("ipv4: Don't ip_rt_put() an error pointer in RAW sockets."). Signed-off-by: Boris Ostrovsky <boris.ostrovsky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent a14b289 commit 738faca

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/ipv6/tcp_ipv6.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,7 @@ static int tcp_v6_send_synack(struct sock *sk, struct request_sock *req,
503503
dst = ip6_dst_lookup_flow(sk, &fl6, final_p, false);
504504
if (IS_ERR(dst)) {
505505
err = PTR_ERR(dst);
506+
dst = NULL;
506507
goto done;
507508
}
508509
skb = tcp_make_synack(sk, dst, req, rvp);

0 commit comments

Comments
 (0)