diff options
author | YOSHIFUJI Hideaki | 2008-06-04 01:30:25 +0900 |
---|---|---|
committer | YOSHIFUJI Hideaki | 2008-06-05 04:02:31 +0900 |
commit | a3c960899e042bc1c2b730a2115fa32da7802039 (patch) | |
tree | d12d8270414bc113b0ae5b7ffc0d23096b30e193 /net/ipv6 | |
parent | e51171019bb0e1f9fb57c25bd2e38ce652eaea27 (diff) |
[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>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/udp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 1fd784f3e2ec..47123bf5eb0f 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -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; |