summaryrefslogtreecommitdiffstats
path: root/src/util/slab.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/slab.c')
-rw-r--r--src/util/slab.c3
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) {