X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=connect.c;h=57dc20c43ca1ba205ec0a18e263f9dde081390f4;hb=5501bf854ce6a3847ef0de6f6aa63f6b93e82b67;hp=3450cabd0e3281e0eeedeb35d331b95bf95f5afb;hpb=12644fa99fd16c33379c885670be0963cec07fc1;p=git.git diff --git a/connect.c b/connect.c index 3450cabd0..57dc20c43 100644 --- a/connect.c +++ b/connect.c @@ -631,8 +631,12 @@ char *git_getpass(const char *prompt) 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;