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;
|
goto out;
|
||||||
while(krb5_kt_next_entry(context, id, &entry, &cursor) == 0) {
|
while(krb5_kt_next_entry(context, id, &entry, &cursor) == 0) {
|
||||||
p = calloc(1, sizeof(*p));
|
p = calloc(1, sizeof(*p));
|
||||||
if(p == NULL) {
|
if (p == NULL) {
|
||||||
krb5_kt_end_seq_get(context, id, &cursor);
|
|
||||||
ret = ENOMEM;
|
ret = ENOMEM;
|
||||||
goto out;
|
break;
|
||||||
}
|
}
|
||||||
p->keytab = entry;
|
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;
|
p->next = *mkey;
|
||||||
*mkey = p;
|
*mkey = p;
|
||||||
|
ret = krb5_crypto_init(context, &p->keytab.keyblock, 0, &p->crypto);
|
||||||
|
if (ret)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
krb5_kt_end_seq_get(context, id, &cursor);
|
krb5_kt_end_seq_get(context, id, &cursor);
|
||||||
out:
|
out:
|
||||||
|
Reference in New Issue
Block a user