The result of git_getpass() is used without checking for NULL, so let's
just die() instead of returning NULL.
Signed-off-by: Johannes Schindelin <redacted>
Signed-off-by: Pat Thoyts <redacted>
Signed-off-by: Junio C Hamano <redacted>
askpass = askpass_program;
if (!askpass)
askpass = getenv("SSH_ASKPASS");
- if (!askpass || !(*askpass))
- return getpass(prompt);
+ if (!askpass || !(*askpass)) {
+ char *result = getpass(prompt);
+ if (!result)
+ die_errno("Could not read password");
+ return result;
+ }
args[0] = askpass;
args[1] = prompt;