diff options
author | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2006-11-21 03:21:34 (GMT) |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 05:30:20 (GMT) |
commit | e69062b4f728dca01ec1a9eb4ed55b73a374f164 (patch) | |
tree | 6f8fe0800c07bb53a47bab00e8dfdb4ff9a912e2 /net/sunrpc/auth_gss/gss_krb5_mech.c | |
parent | af997d8c9568d556cd0a362d56de9fb14a6a012a (diff) | |
download | linux-fsl-qoriq-e69062b4f728dca01ec1a9eb4ed55b73a374f164.tar.xz |
[SUNRPC]: Use k{mem,str}dup where applicable
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/sunrpc/auth_gss/gss_krb5_mech.c')
-rw-r--r-- | net/sunrpc/auth_gss/gss_krb5_mech.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sunrpc/auth_gss/gss_krb5_mech.c b/net/sunrpc/auth_gss/gss_krb5_mech.c index 325e72e..754b8cd 100644 --- a/net/sunrpc/auth_gss/gss_krb5_mech.c +++ b/net/sunrpc/auth_gss/gss_krb5_mech.c @@ -70,10 +70,9 @@ simple_get_netobj(const void *p, const void *end, struct xdr_netobj *res) q = (const void *)((const char *)p + len); if (unlikely(q > end || q < p)) return ERR_PTR(-EFAULT); - res->data = kmalloc(len, GFP_KERNEL); + res->data = kmemdup(p, len, GFP_KERNEL); if (unlikely(res->data == NULL)) return ERR_PTR(-ENOMEM); - memcpy(res->data, p, len); res->len = len; return q; } |