diff options
author | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2006-11-20 22:21:34 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:30:20 -0500 |
commit | e69062b4f728dca01ec1a9eb4ed55b73a374f164 (patch) | |
tree | 6f8fe0800c07bb53a47bab00e8dfdb4ff9a912e2 /net/sunrpc/auth_gss/auth_gss.c | |
parent | af997d8c9568d556cd0a362d56de9fb14a6a012a (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/auth_gss.c')
-rw-r--r-- | net/sunrpc/auth_gss/auth_gss.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index b36b9463f5a4..e5a84a482e57 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c | |||
@@ -198,11 +198,10 @@ simple_get_netobj(const void *p, const void *end, struct xdr_netobj *dest) | |||
198 | q = (const void *)((const char *)p + len); | 198 | q = (const void *)((const char *)p + len); |
199 | if (unlikely(q > end || q < p)) | 199 | if (unlikely(q > end || q < p)) |
200 | return ERR_PTR(-EFAULT); | 200 | return ERR_PTR(-EFAULT); |
201 | dest->data = kmalloc(len, GFP_KERNEL); | 201 | dest->data = kmemdup(p, len, GFP_KERNEL); |
202 | if (unlikely(dest->data == NULL)) | 202 | if (unlikely(dest->data == NULL)) |
203 | return ERR_PTR(-ENOMEM); | 203 | return ERR_PTR(-ENOMEM); |
204 | dest->len = len; | 204 | dest->len = len; |
205 | memcpy(dest->data, p, len); | ||
206 | return q; | 205 | return q; |
207 | } | 206 | } |
208 | 207 | ||