summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/auth_gss/gss_krb5_mech.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2006-11-21 01:21:34 -0200
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-02 21:30:20 -0800
commite69062b4f728dca01ec1a9eb4ed55b73a374f164 (patch)
tree6f8fe0800c07bb53a47bab00e8dfdb4ff9a912e2 /net/sunrpc/auth_gss/gss_krb5_mech.c
parentaf997d8c9568d556cd0a362d56de9fb14a6a012a (diff)
downloadblackbird-op-linux-e69062b4f728dca01ec1a9eb4ed55b73a374f164.tar.gz
blackbird-op-linux-e69062b4f728dca01ec1a9eb4ed55b73a374f164.zip
[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.c3
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 325e72e4fd31..754b8cd6439f 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;
}
OpenPOWER on IntegriCloud