From 443ce5fef316e3dc324fe84557a06b069dbe33f9 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Thu, 11 Jul 2013 20:39:51 -0400 Subject: 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. --- src/plugins/preauth/otp/otp_state.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/preauth') 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; -- cgit