summaryrefslogtreecommitdiff
path: root/net/ipv6/udp.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-06-03 16:30:25 (GMT)
committerYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-06-04 19:02:31 (GMT)
commita3c960899e042bc1c2b730a2115fa32da7802039 (patch)
treed12d8270414bc113b0ae5b7ffc0d23096b30e193 /net/ipv6/udp.c
parente51171019bb0e1f9fb57c25bd2e38ce652eaea27 (diff)
downloadlinux-fsl-qoriq-a3c960899e042bc1c2b730a2115fa32da7802039.tar.xz
[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/udp.c')
-rw-r--r--net/ipv6/udp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 1fd784f..47123bf 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;