Commit c251f3bbe775374a65ed6b6d843e26a7de90ad8b

Edward Thomson 2014-12-08T16:05:47

win32: remember to cleanup our hash_ctx

diff --git a/src/indexer.c b/src/indexer.c
index 8127ff8..92f85c1 100644
--- a/src/indexer.c
+++ b/src/indexer.c
@@ -1028,6 +1028,7 @@ int git_indexer_commit(git_indexer *idx, git_transfer_progress *stats)
 	p_rename(idx->pack->pack_name, git_buf_cstr(&filename));
 
 	git_buf_free(&filename);
+	git_hash_ctx_cleanup(&ctx);
 	return 0;
 
 on_error:
diff --git a/src/odb.c b/src/odb.c
index 5961b35..d2dff71 100644
--- a/src/odb.c
+++ b/src/odb.c
@@ -1045,6 +1045,7 @@ void git_odb_stream_free(git_odb_stream *stream)
 	if (stream == NULL)
 		return;
 
+	git_hash_ctx_cleanup(stream->hash_ctx);
 	git__free(stream->hash_ctx);
 	stream->free(stream);
 }