Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f65bd5ec authored by Axel Lin's avatar Axel Lin Committed by David S. Miller
Browse files

RxRPC: Fix kcalloc parameters swapped



The first parameter should be "number of elements" and the second parameter
should be "element size".

Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Acked-by: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fc543637
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;