1
0
mirror of https://github.com/git/git.git synced 2024-10-21 09:18:12 +02:00

Merge branch 'jk/credential-plug-leak'

An earlier "clean-up" introduced an unnecessary memory leak.

* jk/credential-plug-leak:
  Revert "prompt: clean up strbuf usage"
This commit is contained in:
Junio C Hamano 2014-01-10 10:33:16 -08:00
commit 56e648e253

@ -22,6 +22,7 @@ static char *do_askpass(const char *cmd, const char *prompt)
if (start_command(&pass))
return NULL;
strbuf_reset(&buffer);
if (strbuf_read(&buffer, pass.out, 20) < 0)
err = 1;
@ -38,7 +39,7 @@ static char *do_askpass(const char *cmd, const char *prompt)
strbuf_setlen(&buffer, strcspn(buffer.buf, "\r\n"));
return strbuf_detach(&buffer, NULL);
return buffer.buf;
}
char *git_prompt(const char *prompt, int flags)