diff options
author | Marek Olšák <[email protected]> | 2017-05-24 18:16:41 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-05-29 01:52:16 +0200 |
commit | c70b0604f0296080333d6dd86940782559bd4a5b (patch) | |
tree | e1db89c0ae42c132bbaecbe597c94cb09b1b69e1 /src/util | |
parent | 5cd8ab49fd11e62b35346b1722c53b18a95231e4 (diff) |
util: slab_destroy_child should check whether it's been initialized
Reviewed-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/slab.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util/slab.c b/src/util/slab.c index 4264814cabc..4ce0e9a3485 100644 --- 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) { |