aboutsummaryrefslogtreecommitdiff
path: root/net/ipv6/udp.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2016-01-14 22:25:14 +0800
committerAlex Shi <alex.shi@linaro.org>2016-01-14 22:25:14 +0800
commitf90ae1b62bedd8b57966a7be68855f2d43170db6 (patch)
treedc332d18219749a17b163d740b8713be5e8d940b /net/ipv6/udp.c
parent346a8beb760237fb0fed811045ec92c799f48d54 (diff)
parent60917545df1ffc7f918550512dc4a14758f74784 (diff)
Merge remote-tracking branch 'lts/linux-3.18.y' into linux-linaro-lsk-v3.18lsk-v3.18-16.01
Diffstat (limited to 'net/ipv6/udp.c')
-rw-r--r--net/ipv6/udp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index dd530f0e5a8a..a5ce70502699 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -1082,6 +1082,7 @@ int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk,
DECLARE_SOCKADDR(struct sockaddr_in6 *, sin6, msg->msg_name);
struct in6_addr *daddr, *final_p, final;
struct ipv6_txoptions *opt = NULL;
+ struct ipv6_txoptions *opt_to_free = NULL;
struct ip6_flowlabel *flowlabel = NULL;
struct flowi6 fl6;
struct dst_entry *dst;
@@ -1234,8 +1235,10 @@ do_udp_sendmsg:
opt = NULL;
connected = 0;
}
- if (opt == NULL)
- opt = np->opt;
+ if (!opt) {
+ opt = txopt_get(np);
+ opt_to_free = opt;
+ }
if (flowlabel)
opt = fl6_merge_options(&opt_space, flowlabel, opt);
opt = ipv6_fixup_options(&opt_space, opt);
@@ -1329,6 +1332,7 @@ do_append_data:
out:
dst_release(dst);
fl6_sock_release(flowlabel);
+ txopt_put(opt_to_free);
if (!err)
return len;
/*