Skip to content

Commit

Permalink
Merge branch 'sb/gpg-plug-fd-leak' into maint
Browse files Browse the repository at this point in the history
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()
  • Loading branch information
Junio C Hamano committed Feb 7, 2013
2 parents 427c6d0 + 7dac3f8 commit d2216a4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gpg-interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d2216a4

Please sign in to comment.