Skip to content

Commit 9a45b15

Browse files
committed
read-cache: free threaded memory pool
In load_cache_entries_threaded(), each thread is allocated its own memory pool. This pool needs to be cleaned up while closing the threads down, or it will be leaked. Signed-off-by: Derrick Stolee <stolee@gmail.com>
1 parent 6258f68 commit 9a45b15

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
@@ -2188,6 +2188,7 @@ static unsigned long load_cache_entries_threaded(struct index_state *istate, con
21882188
if (err)
21892189
die(_("unable to join load_cache_entries thread: %s"), strerror(err));
21902190
mem_pool_combine(istate->ce_mem_pool, p->ce_mem_pool);
2191+
free(p->ce_mem_pool);
21912192
consumed += p->consumed;
21922193
}
21932194

0 commit comments

Comments
 (0)