aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/auth_gss/gss_krb5_mech.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2006-11-20 22:21:34 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:30:20 -0500
commite69062b4f728dca01ec1a9eb4ed55b73a374f164 (patch)
tree6f8fe0800c07bb53a47bab00e8dfdb4ff9a912e2 /net/sunrpc/auth_gss/gss_krb5_mech.c
parentaf997d8c9568d556cd0a362d56de9fb14a6a012a (diff)
[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)
70 q = (const void *)((const char *)p + len); 70 q = (const void *)((const char *)p + len);
71 if (unlikely(q > end || q < p)) 71 if (unlikely(q > end || q < p))
72 return ERR_PTR(-EFAULT); 72 return ERR_PTR(-EFAULT);
73 res->data = kmalloc(len, GFP_KERNEL); 73 res->data = kmemdup(p, len, GFP_KERNEL);
74 if (unlikely(res->data == NULL)) 74 if (unlikely(res->data == NULL))
75 return ERR_PTR(-ENOMEM); 75 return ERR_PTR(-ENOMEM);
76 memcpy(res->data, p, len);
77 res->len = len; 76 res->len = len;
78 return q; 77 return q;
79} 78}