Commit Diff


commit - dbbf4a5f0cfb712c5970dcb79a65c5dd2e62b19a
commit + e5ad73651d7663bfc6ca5d6f3ec622c5f59413bf
blob - 1d8cea7e965300fd88bff54f9fcfd727a5a12b7c
blob + e11b7d2292e10741d6a883a408cbd72d61137d6f
--- libexec/got-read-object/got-read-object.c
+++ libexec/got-read-object/got-read-object.c
@@ -191,6 +191,8 @@ main(int argc, char *argv[])
 			}
 			err = send_raw_obj(&ibuf, obj, imsg.fd, imsg_outfd.fd);
 			imsg.fd = -1; /* imsg.fd is owned by send_raw_obj() */
+			if (close(imsg_outfd.fd) == -1 && err == NULL)
+				err = got_error_from_errno("close");
 			imsg_free(&imsg_outfd);
 			if (err)
 				goto done;