Merge branch 'sb/gpg-plug-fd-leak'

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()
This commit is contained in:
Junio C Hamano 2013-02-05 16:12:43 -08:00
commit 15778842bd

View File

@ -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);