[HEIMDAL-646] malloc(0) checks for AIX

This commit is contained in:
Love Hornquist Astrand
2009-10-11 17:19:00 -07:00
parent dba1d46edf
commit da376b3c48

View File

@@ -84,7 +84,7 @@ del_enctype(void *opt, int argc, char **argv)
} }
new_key_data = malloc(princ.n_key_data * sizeof(*new_key_data)); new_key_data = malloc(princ.n_key_data * sizeof(*new_key_data));
if (new_key_data == NULL) { if (new_key_data == NULL && princ.n_key_data != 0) {
krb5_warnx (context, "out of memory"); krb5_warnx (context, "out of memory");
goto out; goto out;
} }