util: fix mutex leaks in mempool

This commit is contained in:
Marek Olšák 2010-07-26 14:53:06 +02:00
parent 8c26dc2bfe
commit d26fb69169
1 changed files with 2 additions and 1 deletions

View File

@ -126,7 +126,6 @@ void util_mempool_set_thread_safety(struct util_mempool *pool,
pool->threading = threading;
if (threading) {
pipe_mutex_init(pool->mutex);
pool->malloc = util_mempool_malloc_mt;
pool->free = util_mempool_free_mt;
} else {
@ -152,6 +151,8 @@ void util_mempool_create(struct util_mempool *pool,
make_empty_list(&pool->list);
pipe_mutex_init(pool->mutex);
util_mempool_set_thread_safety(pool, threading);
}