Skip to content

Commit

Permalink
ipv6: Don't pass invalid dst_entry pointer to dst_release().
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
ostr authored and davem330 committed Apr 4, 2011
1 parent a14b289 commit 738faca
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/ipv6/tcp_ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
if (IS_ERR(dst)) {
err = PTR_ERR(dst);
dst = NULL;
goto done;
}
skb = tcp_make_synack(sk, dst, req, rvp);
Expand Down

0 comments on commit 738faca

Please sign in to comment.