In 13c8a2c212 permits fclose() to
be issued on 'stdin' and forgets to use the N_() macro for text
strings.

Change-Id: I5e9ac1354da8dcff5277c39e4784a768ad76afdd
This commit is contained in:
Jeffrey Altman
2017-04-24 17:41:35 -04:00
parent c02af7b3bb
commit dcd3e45e02

View File

@@ -460,7 +460,7 @@ get_new_tickets(krb5_context context,
else else
f = fopen(password_file, "r"); f = fopen(password_file, "r");
if (f == NULL) { if (f == NULL) {
krb5_warnx(context, "Failed to open the password file %s", krb5_warnx(context, N_("Failed to open the password file %s", ""),
password_file); password_file);
return errno; return errno;
} }
@@ -468,7 +468,8 @@ get_new_tickets(krb5_context context,
if (fgets(passwd, sizeof(passwd), f) == NULL) { if (fgets(passwd, sizeof(passwd), f) == NULL) {
krb5_warnx(context, N_("Failed to read password from file %s", ""), krb5_warnx(context, N_("Failed to read password from file %s", ""),
password_file); password_file);
fclose(f); if (f != stdin)
fclose(f);
return EINVAL; /* XXX Need a better error */ return EINVAL; /* XXX Need a better error */
} }
if (f != stdin) if (f != stdin)