diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-02-08 00:14:54 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-02-08 00:14:54 +0100 |
commit | d2216a4b133f90a543a0e4c4a9f9809a043012d6 (patch) | |
tree | 97866fbd1cd793ff15ac8a2da91e265468fa8ec6 /gpg-interface.c | |
parent | Merge branch 'jc/fake-ancestor-with-non-blobs' into maint (diff) | |
parent | gpg: close stderr once finished with it in verify_signed_buffer() (diff) | |
download | git-d2216a4b133f90a543a0e4c4a9f9809a043012d6.tar.xz git-d2216a4b133f90a543a0e4c4a9f9809a043012d6.zip |
Merge branch 'sb/gpg-plug-fd-leak' into maint
We forgot to close the file descriptor reading from "gpg" output,
killing "git log --show-signature" on a long history.
* sb/gpg-plug-fd-leak:
gpg: close stderr once finished with it in verify_signed_buffer()
Diffstat (limited to 'gpg-interface.c')
-rw-r--r-- | gpg-interface.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gpg-interface.c b/gpg-interface.c index 0863c61800..5f142f6198 100644 --- a/gpg-interface.c +++ b/gpg-interface.c @@ -130,8 +130,10 @@ int verify_signed_buffer(const char *payload, size_t payload_size, write_in_full(gpg.in, payload, payload_size); close(gpg.in); - if (gpg_output) + if (gpg_output) { strbuf_read(gpg_output, gpg.err, 0); + close(gpg.err); + } ret = finish_command(&gpg); unlink_or_warn(path); |