projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8c26dc2
)
util: fix mutex leaks in mempool
author
Marek Olšák
<maraeo@gmail.com>
Mon, 26 Jul 2010 12:53:06 +0000
(14:53 +0200)
committer
Marek Olšák
<maraeo@gmail.com>
Mon, 26 Jul 2010 12:53:27 +0000
(14:53 +0200)
src/gallium/auxiliary/util/u_mempool.c
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/util/u_mempool.c
b/src/gallium/auxiliary/util/u_mempool.c
index 84e2a34acc63a685b049a3e1e0420ee488ce9a40..6b1a72a7f6737af206a941fa4bd3189604bb3d7d 100644
(file)
--- a/
src/gallium/auxiliary/util/u_mempool.c
+++ b/
src/gallium/auxiliary/util/u_mempool.c
@@
-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);
}