Skip to content

Commit b6fe5b3

Browse files
committed
read-cache: free hash context in do_write_index()
While writing an index, a 'git_hash_ctx' is allocated for hashing the file contents. This should be freed as the method exits. Signed-off-by: Derrick Stolee <stolee@gmail.com>
1 parent 9a45b15 commit b6fe5b3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

read-cache.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3126,6 +3126,7 @@ static int do_write_index(struct index_state *istate, struct tempfile *tempfile,
31263126
free_hashfile(f);
31273127
strbuf_release(&sb);
31283128
free(ieot);
3129+
free(eoie_c);
31293130
return ret;
31303131
}
31313132

0 commit comments

Comments
 (0)