Commit Diff


commit - 43ff8261e1c6fdb609986add011ed0313f6eabe6
commit + f4d199c99e2463414ab27d393fa98378de352bad
blob - 9eb8aa6b3eb9f5b01200496dc831e990f16f4a3e
blob + 97439bcdb73352802a76bf9d776689b42f8aa53b
--- lib/worktree.c
+++ lib/worktree.c
@@ -1211,7 +1211,7 @@ done:
 	if (blob)
 		got_object_blob_close(blob);
 	if (f != NULL && fclose(f) == EOF && err == NULL)
-		fclose(f);
+		err = got_error_from_errno2("fclose", abspath);
 	if (fd != -1 && close(fd) == -1 && err == NULL)
 		err = got_error_from_errno2("close", abspath);
 	return err;