diff --git a/builtin-tag.c b/builtin-tag.c
index 716b4fff323f7df638f8bed0940a1119e43c2590..28c36fdcd1658968ff7c3e2f1d6ba6f364f99592 100644 (file)
--- a/builtin-tag.c
+++ b/builtin-tag.c
if (write_in_full(gpg.in, buffer->buf, buffer->len) != buffer->len) {
close(gpg.in);
+ close(gpg.out);
finish_command(&gpg);
return error("gpg did not accept the tag data");
}
close(gpg.in);
- gpg.close_in = 0;
len = strbuf_read(buffer, gpg.out, 1024);
+ close(gpg.out);
if (finish_command(&gpg) || !len || len < 0)
return error("gpg failed to sign the tag");