Skip to content

Commit d2216a4

Browse files
committed
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()
2 parents 427c6d0 + 7dac3f8 commit d2216a4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

gpg-interface.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,10 @@ int verify_signed_buffer(const char *payload, size_t payload_size,
130130
write_in_full(gpg.in, payload, payload_size);
131131
close(gpg.in);
132132

133-
if (gpg_output)
133+
if (gpg_output) {
134134
strbuf_read(gpg_output, gpg.err, 0);
135+
close(gpg.err);
136+
}
135137
ret = finish_command(&gpg);
136138

137139
unlink_or_warn(path);

0 commit comments

Comments
 (0)