use calloc to allocate salt

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24989 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2009-03-29 09:03:05 +00:00
parent e479d05927
commit 5bfb2c6578

View File

@@ -203,7 +203,7 @@ parse_keys(hdb_entry *ent, char *str)
p++;
p_len = strlen(p);
key->salt = malloc(sizeof(*key->salt));
key->salt = calloc(1, sizeof(*key->salt));
if (key->salt == NULL)
krb5_errx (context, 1, "malloc: out of memory");
key->salt->type = type;