Commit Diff


commit - 9389bcf69b554cb6da81ece9452257fa11011dd2
commit + 4049b748bf8123e8db01bb537b375091eaeb5d80
blob - f51da97821cba0f907928ca4b45fc11bd60554a6
blob + a7188e594585fd71bd9c7214053d45590d2464fb
--- lib/fetch.c
+++ lib/fetch.c
@@ -347,6 +347,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");