Commit 7a13e6e501f6808283b956b84746cc9e8d2f1b25

Stefan Sperling 2022-06-28T18:19:03

pass the correct file to fdopen(); ok tracey

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/object.c b/lib/object.c
index a2fb22f..d2ba8bf 100644
--- a/lib/object.c
+++ b/lib/object.c
@@ -1428,7 +1428,7 @@ open_blob(struct got_blob_object **blob, struct got_repository *repo,
 			goto done;
 		}
 
-		(*blob)->f = fdopen(outfd, "rb");
+		(*blob)->f = fdopen(dfd, "rb");
 		if ((*blob)->f == NULL) {
 			err = got_error_from_errno("fdopen");
 			close(dfd);