Commit 2571cc3cff67fe958727496bb1d660e5810bd8e1

Vicent Marti 2011-04-15T20:32:31

Close file descriptor when writing a blob

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/src/blob.c b/src/blob.c
index bc0a08a..5e3c22f 100644
--- a/src/blob.c
+++ b/src/blob.c
@@ -115,6 +115,7 @@ int git_blob_create_fromfile(git_oid *oid, git_repository *repo, const char *pat
 
 	error = stream->finalize_write(oid, stream);
 	stream->free(stream);
+	gitfo_close(fd);
 
 	return error;
 }