summaryrefslogtreecommitdiffstats
path: root/src/plugins/preauth/otp
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2013-07-11 20:39:51 -0400
committerGreg Hudson <ghudson@mit.edu>2013-07-11 20:39:51 -0400
commit443ce5fef316e3dc324fe84557a06b069dbe33f9 (patch)
tree1aa5e33e71690fdbd4d3f7dc36ea3de8b82869df /src/plugins/preauth/otp
parent90f9f6f6708baff4de2162c5eb754bb4bc557845 (diff)
downloadkrb5-443ce5fef316e3dc324fe84557a06b069dbe33f9.tar.gz
krb5-443ce5fef316e3dc324fe84557a06b069dbe33f9.tar.xz
krb5-443ce5fef316e3dc324fe84557a06b069dbe33f9.zip
Use k5calloc instead of k5alloc where appropriate
Wherever we use k5alloc with a multiplication in the size parameter,, use the new k5calloc helper function instead.
Diffstat (limited to 'src/plugins/preauth/otp')
-rw-r--r--src/plugins/preauth/otp/otp_state.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/preauth/otp/otp_state.c b/src/plugins/preauth/otp/otp_state.c
index f2a64a404..a4d7e3b5e 100644
--- a/src/plugins/preauth/otp/otp_state.c
+++ b/src/plugins/preauth/otp/otp_state.c
@@ -293,7 +293,7 @@ token_types_decode(profile_t profile, token_type **out)
}
/* Leave space for the default (possibly) and the terminator. */
- types = k5alloc((i + 2) * sizeof(token_type), &retval);
+ types = k5calloc(i + 2, sizeof(token_type), &retval);
if (types == NULL)
goto cleanup;
@@ -441,7 +441,7 @@ tokens_decode(krb5_context ctx, krb5_const_principal princ,
return retval;
len = k5_json_array_length(arr);
- tokens = k5alloc((len + 1) * sizeof(token), &retval);
+ tokens = k5calloc(len + 1, sizeof(token), &retval);
if (tokens == NULL)
goto cleanup;