[IPV6] UDP: Possible dst leak in udpv6_sendmsg.
ip6_sk_dst_lookup returns held dst entry. It should be released on all paths beyond this point. Add missed release when up->pending is set. Bug report and initial patch by Denis V. Lunev <den@openvz.org>. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Acked-by: Denis V. Lunev <den@openvz.org>
This commit is contained in:
parent
e51171019b
commit
a3c960899e
@ -848,12 +848,14 @@ do_append_data:
|
||||
} else {
|
||||
dst_release(dst);
|
||||
}
|
||||
dst = NULL;
|
||||
}
|
||||
|
||||
if (err > 0)
|
||||
err = np->recverr ? net_xmit_errno(err) : 0;
|
||||
release_sock(sk);
|
||||
out:
|
||||
dst_release(dst);
|
||||
fl6_sock_release(flowlabel);
|
||||
if (!err)
|
||||
return len;
|
||||
|
Loading…
Reference in New Issue
Block a user