projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fc54363
)
RxRPC: Fix kcalloc parameters swapped
author
Axel Lin
<
[email protected]
>
Mon, 13 Feb 2012 20:19:14 +0000
(20:19 +0000)
committer
David S. Miller
<
[email protected]
>
Tue, 14 Feb 2012 19:41:55 +0000
(14:41 -0500)
The first parameter should be "number of elements" and the second parameter
should be "element size".
Signed-off-by: Axel Lin <
[email protected]
>
Acked-by: David Howells <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/rxrpc/ar-key.c
patch
|
blob
|
history
diff --git
a/net/rxrpc/ar-key.c
b/net/rxrpc/ar-key.c
index 4cba13e46ffd7e13868526ec5acaee5fdde005e2..ae3a035f53908daea1784fcb5224d16946af5314 100644
(file)
--- 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,
if (toklen <= (n_parts + 1) * 4)
return -EINVAL;
- princ->name_parts = kcalloc(
sizeof(char *), n_parts
, GFP_KERNEL);
+ princ->name_parts = kcalloc(
n_parts, sizeof(char *)
, GFP_KERNEL);
if (!princ->name_parts)
return -ENOMEM;
@@
-355,7
+355,7
@@
static int rxrpc_krb5_decode_tagged_array(struct krb5_tagged_data **_td,
_debug("n_elem %d", n_elem);
- td = kcalloc(
sizeof(struct krb5_tagged_data), n_elem
,
+ td = kcalloc(
n_elem, sizeof(struct krb5_tagged_data)
,
GFP_KERNEL);
if (!td)
return -ENOMEM;