projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5cd8ab4
)
util: slab_destroy_child should check whether it's been initialized
author
Marek Olšák
<marek.olsak@amd.com>
Wed, 24 May 2017 16:16:41 +0000
(18:16 +0200)
committer
Marek Olšák
<marek.olsak@amd.com>
Sun, 28 May 2017 23:52:16 +0000
(
01:52
+0200)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/util/slab.c
patch
|
blob
|
history
diff --git
a/src/util/slab.c
b/src/util/slab.c
index 4264814cabc926c623f47b5b1a9b70f5578f3664..4ce0e9a34852ca08d473c8585a322a71b93fdc5b 100644
(file)
--- a/
src/util/slab.c
+++ b/
src/util/slab.c
@@
-140,6
+140,9
@@
void slab_create_child(struct slab_child_pool *pool,
*/
void slab_destroy_child(struct slab_child_pool *pool)
{
+ if (!pool->parent)
+ return; /* the slab probably wasn't even created */
+
mtx_lock(&pool->parent->mutex);
while (pool->pages) {