hdb: more read_master_key leaks
Change-Id: Icf0bb8dc3cdcd2babb91b4180cec37737772373d
This commit is contained in:
@@ -129,19 +129,16 @@ read_master_keytab(krb5_context context, const char *filename,
|
||||
goto out;
|
||||
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);
|
||||
if (p == NULL) {
|
||||
ret = ENOMEM;
|
||||
goto out;
|
||||
break;
|
||||
}
|
||||
p->keytab = entry;
|
||||
ret = krb5_crypto_init(context, &p->keytab.keyblock, 0, &p->crypto);
|
||||
if (ret) {
|
||||
krb5_kt_end_seq_get(context, id, &cursor);
|
||||
goto out;
|
||||
}
|
||||
p->next = *mkey;
|
||||
*mkey = p;
|
||||
ret = krb5_crypto_init(context, &p->keytab.keyblock, 0, &p->crypto);
|
||||
if (ret)
|
||||
break;
|
||||
}
|
||||
krb5_kt_end_seq_get(context, id, &cursor);
|
||||
out:
|
||||
|
Reference in New Issue
Block a user