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/krb5/os | |
| 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/krb5/os')
| -rw-r--r-- | src/lib/krb5/os/expand_path.c | 2 | ||||
| -rw-r--r-- | src/lib/krb5/os/localauth.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/krb5/os/expand_path.c b/src/lib/krb5/os/expand_path.c index 3d23849ba..f14e9acd8 100644 --- a/src/lib/krb5/os/expand_path.c +++ b/src/lib/krb5/os/expand_path.c @@ -477,7 +477,7 @@ k5_expand_path_tokens_extra(krb5_context context, const char *path_in, /* Get extra tokens. */ if (nargs > 0) { - extra_tokens = k5alloc((nargs + 1) * sizeof(char *), &ret); + extra_tokens = k5calloc(nargs + 1, sizeof(char *), &ret); if (extra_tokens == NULL) goto cleanup; va_start(ap, path_out); diff --git a/src/lib/krb5/os/localauth.c b/src/lib/krb5/os/localauth.c index 82fc1f950..81ab5d8ab 100644 --- a/src/lib/krb5/os/localauth.c +++ b/src/lib/krb5/os/localauth.c @@ -155,7 +155,7 @@ load_localauth_modules(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; |
