diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2016-09-01 12:33:46 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2016-09-01 12:33:46 -0400 |
commit | 0cb7bf61b1e9f05027de58c80f9b46a714d24e35 (patch) | |
tree | 41fb55cf62d07b425122f9a8b96412c0d8eb99c5 /net/ipv6/calipso.c | |
parent | aa877175e7a9982233ed8f10cb4bfddd78d82741 (diff) | |
parent | 3eab887a55424fc2c27553b7bfe32330df83f7b8 (diff) |
Merge branch 'linus' into smp/hotplug
Apply upstream changes to avoid conflicts with pending patches.
Diffstat (limited to 'net/ipv6/calipso.c')
-rw-r--r-- | net/ipv6/calipso.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv6/calipso.c b/net/ipv6/calipso.c index c53b92c617c5..37ac9de713c6 100644 --- a/net/ipv6/calipso.c +++ b/net/ipv6/calipso.c | |||
@@ -952,8 +952,10 @@ calipso_opt_insert(struct ipv6_opt_hdr *hop, | |||
952 | memcpy(new, hop, start); | 952 | memcpy(new, hop, start); |
953 | ret_val = calipso_genopt((unsigned char *)new, start, buf_len, doi_def, | 953 | ret_val = calipso_genopt((unsigned char *)new, start, buf_len, doi_def, |
954 | secattr); | 954 | secattr); |
955 | if (ret_val < 0) | 955 | if (ret_val < 0) { |
956 | kfree(new); | ||
956 | return ERR_PTR(ret_val); | 957 | return ERR_PTR(ret_val); |
958 | } | ||
957 | 959 | ||
958 | buf_len = start + ret_val; | 960 | buf_len = start + ret_val; |
959 | /* At this point buf_len aligns to 4n, so (buf_len & 4) pads to 8n */ | 961 | /* At this point buf_len aligns to 4n, so (buf_len & 4) pads to 8n */ |