use calloc to allocate salt
authorLove Hörnquist Åstrand <lha@kth.se>
Sun, 29 Mar 2009 09:03:05 +0000 (09:03 +0000)
committerLove Hörnquist Åstrand <lha@kth.se>
Sun, 29 Mar 2009 09:03:05 +0000 (09:03 +0000)
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24989 ec53bebd-3082-4978-b11e-865c3cabbd6b

kadmin/load.c

index a75bd7a37ede5522ed08a6ef3140f11821935e75..09f1622fbbdc390d3a971e7bd11be8e747c8020d 100644 (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;