krb5: Fix NULL deref on ENOMEM in fkt_add_entry()
This commit is contained in:
@@ -561,6 +561,10 @@ fkt_add_entry(krb5_context context,
|
||||
return ret;
|
||||
}
|
||||
sp = krb5_storage_stdio_from_fd(fd, "wb+");
|
||||
if (sp == NULL) {
|
||||
close(fd);
|
||||
return krb5_enomem(context);
|
||||
}
|
||||
krb5_storage_set_eof_code(sp, KRB5_KT_END);
|
||||
ret = fkt_setup_keytab(context, id, sp);
|
||||
if (ret) {
|
||||
|
Reference in New Issue
Block a user