check return value of alloc functions, from Charles Longeau
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21745 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -129,6 +129,11 @@ read_master_keytab(krb5_context context, const char *filename,
|
||||
*mkey = NULL;
|
||||
while(krb5_kt_next_entry(context, id, &entry, &cursor) == 0) {
|
||||
p = calloc(1, sizeof(*p));
|
||||
if(p == NULL) {
|
||||
krb5_kt_end_seq_get(context, id, &cursor);
|
||||
ret = ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
p->keytab = entry;
|
||||
ret = krb5_crypto_init(context, &p->keytab.keyblock, 0, &p->crypto);
|
||||
p->next = *mkey;
|
||||
|
Reference in New Issue
Block a user