diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-02-13 15:19:14 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-14 14:41:55 -0500 |
commit | f65bd5ec47a4461bc575d5d34902fd18b6ec5542 (patch) | |
tree | a3620efc993f54214badf3c9b738a00aab840087 /net/rxrpc | |
parent | fc543637525b59af38af2ce09a4dbdd7d5eb27bf (diff) |
RxRPC: Fix kcalloc parameters swapped
The first parameter should be "number of elements" and the second parameter
should be "element size".
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rxrpc')
-rw-r--r-- | net/rxrpc/ar-key.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/rxrpc/ar-key.c b/net/rxrpc/ar-key.c index 4cba13e46ffd..ae3a035f5390 100644 --- a/net/rxrpc/ar-key.c +++ b/net/rxrpc/ar-key.c | |||
@@ -232,7 +232,7 @@ static int rxrpc_krb5_decode_principal(struct krb5_principal *princ, | |||
232 | if (toklen <= (n_parts + 1) * 4) | 232 | if (toklen <= (n_parts + 1) * 4) |
233 | return -EINVAL; | 233 | return -EINVAL; |
234 | 234 | ||
235 | princ->name_parts = kcalloc(sizeof(char *), n_parts, GFP_KERNEL); | 235 | princ->name_parts = kcalloc(n_parts, sizeof(char *), GFP_KERNEL); |
236 | if (!princ->name_parts) | 236 | if (!princ->name_parts) |
237 | return -ENOMEM; | 237 | return -ENOMEM; |
238 | 238 | ||
@@ -355,7 +355,7 @@ static int rxrpc_krb5_decode_tagged_array(struct krb5_tagged_data **_td, | |||
355 | 355 | ||
356 | _debug("n_elem %d", n_elem); | 356 | _debug("n_elem %d", n_elem); |
357 | 357 | ||
358 | td = kcalloc(sizeof(struct krb5_tagged_data), n_elem, | 358 | td = kcalloc(n_elem, sizeof(struct krb5_tagged_data), |
359 | GFP_KERNEL); | 359 | GFP_KERNEL); |
360 | if (!td) | 360 | if (!td) |
361 | return -ENOMEM; | 361 | return -ENOMEM; |