diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2005-11-20 12:18:17 +0900 |
---|---|---|
committer | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2005-11-20 12:18:17 +0900 |
commit | 8b8aa4b5a66ecf90f0a7033c8cbc49cfd97c4347 (patch) | |
tree | dded29563ca2fc586c29d24ff400a1eb63bc370e /net/ipv6/exthdrs.c | |
parent | 741b2252a5e14d6c60a913c77a6099abe73a854a (diff) | |
download | kernel_samsung_crespo-8b8aa4b5a66ecf90f0a7033c8cbc49cfd97c4347.zip kernel_samsung_crespo-8b8aa4b5a66ecf90f0a7033c8cbc49cfd97c4347.tar.gz kernel_samsung_crespo-8b8aa4b5a66ecf90f0a7033c8cbc49cfd97c4347.tar.bz2 |
[IPV6]: Fix memory management error during setting up new advapi sockopts.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'net/ipv6/exthdrs.c')
-rw-r--r-- | net/ipv6/exthdrs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c index 9225495..748577b 100644 --- a/net/ipv6/exthdrs.c +++ b/net/ipv6/exthdrs.c @@ -628,6 +628,7 @@ ipv6_renew_options(struct sock *sk, struct ipv6_txoptions *opt, if (!tot_len) return NULL; + tot_len += sizeof(*opt2); opt2 = sock_kmalloc(sk, tot_len, GFP_ATOMIC); if (!opt2) return ERR_PTR(-ENOBUFS); @@ -668,7 +669,7 @@ ipv6_renew_options(struct sock *sk, struct ipv6_txoptions *opt, return opt2; out: - sock_kfree_s(sk, p, tot_len); + sock_kfree_s(sk, opt2, opt2->tot_len); return ERR_PTR(err); } |