Commit Diff


commit - ce7556f23f6b599e1f224216af82b0a097a13ca3
commit + 7a13e6e501f6808283b956b84746cc9e8d2f1b25
blob - a2fb22ffb05d1bb22133d52b772caf2c5120b1e8
blob + d2ba8bff2999366cb470b0e5b15c07f8d2a96442
--- lib/object.c
+++ lib/object.c
@@ -1428,7 +1428,7 @@ open_blob(struct got_blob_object **blob, struct got_re
 			goto done;
 		}
 
-		(*blob)->f = fdopen(outfd, "rb");
+		(*blob)->f = fdopen(dfd, "rb");
 		if ((*blob)->f == NULL) {
 			err = got_error_from_errno("fdopen");
 			close(dfd);