summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dbda967)
raw | patch | inline | side by side (parent: dbda967)
author | Johannes Schindelin <johannes.schindelin@gmx.de> | |
Wed, 29 Sep 2010 22:22:32 +0000 (23:22 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 30 Sep 2010 19:22:02 +0000 (12:22 -0700) |
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@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
just die() instead of returning NULL.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
connect.c | patch | blob | history |
diff --git a/connect.c b/connect.c
index 3450cabd0e3281e0eeedeb35d331b95bf95f5afb..57dc20c43ca1ba205ec0a18e263f9dde081390f4 100644 (file)
--- a/connect.c
+++ b/connect.c
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;