From: Johannes Schindelin <johannes.schindelin@xxxxxx> 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 <johannes.schindelin@xxxxxx> --- connect.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/connect.c b/connect.c index 3450cab..57dc20c 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; -- 1.7.3 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html