lib/kadm5: use krb5_enomem() where possible

Change-Id: I487fbc640a8f793f0aa02ef4c94099e09241d616
This commit is contained in:
Jeffrey Altman
2018-12-24 14:53:06 -05:00
committed by Nico Williams
parent 50ebc1491a
commit db859520b4
23 changed files with 122 additions and 131 deletions

View File

@@ -216,10 +216,8 @@ append_to_log_file(krb5_context context,
return EOVERFLOW;
buf = malloc(len);
if (buf == NULL && len != 0) {
krb5_warn(context, errno, "malloc: no memory");
return ENOMEM;
}
if (buf == NULL && len != 0)
return krb5_enomem(context);
if (krb5_storage_seek(sp, start, SEEK_SET) != start) {
krb5_errx(context, IPROPD_RESTART,