Commit Diff


commit - 28526235ae6336b37d0f79a3c266c3a92587f279
commit + 688fe08b75a31d11eaf64a44751f903bdfa61b68
blob - 6c0dbf4a0ba8148e5f95f882f51bda4b71ebc4f1
blob + 66bbb446389b857c55aa7f47ab02c895a18b660b
--- lib/fetch.c
+++ lib/fetch.c
@@ -352,6 +352,10 @@ got_fetch_pack(struct got_object_id **pack_hash, struc
 				break;
 			packfile_size = packfile_size_cur;
 		}
+	}
+	if (close(imsg_fetchfds[0]) == -1) {
+		err = got_error_from_errno("close");
+		goto done;
 	}
 	if (waitpid(fetchpid, &fetchstatus, 0) == -1) {
 		err = got_error_from_errno("waitpid");