diff options
| author | Greg Hudson <ghudson@mit.edu> | 2013-07-11 20:39:51 -0400 |
|---|---|---|
| committer | Greg Hudson <ghudson@mit.edu> | 2013-07-11 20:39:51 -0400 |
| commit | 443ce5fef316e3dc324fe84557a06b069dbe33f9 (patch) | |
| tree | 1aa5e33e71690fdbd4d3f7dc36ea3de8b82869df /src/lib/kadm5 | |
| parent | 90f9f6f6708baff4de2162c5eb754bb4bc557845 (diff) | |
| download | krb5-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/lib/kadm5')
| -rw-r--r-- | src/lib/kadm5/srv/kadm5_hook.c | 2 | ||||
| -rw-r--r-- | src/lib/kadm5/srv/pwqual.c | 2 | ||||
| -rw-r--r-- | src/lib/kadm5/srv/server_kdb.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/kadm5/srv/kadm5_hook.c b/src/lib/kadm5/srv/kadm5_hook.c index 68a6b5eb4..62f3bffce 100644 --- a/src/lib/kadm5/srv/kadm5_hook.c +++ b/src/lib/kadm5/srv/kadm5_hook.c @@ -53,7 +53,7 @@ k5_kadm5_hook_load(krb5_context context, /* Allocate a large enough list of handles. */ for (count = 0; modules[count] != NULL; count++); - list = k5alloc((count + 1) * sizeof(*list), &ret); + list = k5calloc(count + 1, sizeof(*list), &ret); if (list == NULL) goto cleanup; diff --git a/src/lib/kadm5/srv/pwqual.c b/src/lib/kadm5/srv/pwqual.c index 8c53391ec..666852f1d 100644 --- a/src/lib/kadm5/srv/pwqual.c +++ b/src/lib/kadm5/srv/pwqual.c @@ -55,7 +55,7 @@ k5_pwqual_load(krb5_context context, const char *dict_file, /* Allocate a large enough list of handles. */ for (count = 0; modules[count] != NULL; count++); - list = k5alloc((count + 1) * sizeof(*list), &ret); + list = k5calloc(count + 1, sizeof(*list), &ret); if (list == NULL) goto cleanup; diff --git a/src/lib/kadm5/srv/server_kdb.c b/src/lib/kadm5/srv/server_kdb.c index 23661448a..8a82237c3 100644 --- a/src/lib/kadm5/srv/server_kdb.c +++ b/src/lib/kadm5/srv/server_kdb.c @@ -188,7 +188,7 @@ kdb_get_hist_key(kadm5_server_handle_t handle, krb5_keyblock **keyblocks_out, if (ret) goto done; - kblist = k5alloc((kdb->n_key_data + 1) * sizeof(*kblist), &ret); + kblist = k5calloc(kdb->n_key_data + 1, sizeof(*kblist), &ret); if (kblist == NULL) goto done; for (i = 0; i < kdb->n_key_data; i++) { |
