diff --git a/src/or/relay.c b/src/or/relay.c index 51e6702e61..a2058690d4 100644 --- a/src/or/relay.c +++ b/src/or/relay.c @@ -1495,9 +1495,12 @@ init_cell_pool(void) void free_cell_pool(void) { - tor_assert(cell_pool); - mp_pool_destroy(cell_pool); - cell_pool = NULL; + /* Maybe we haven't called init_cell_pool yet; need to check for it. */ + if (cell_pool) { + tor_assert(cell_pool); + mp_pool_destroy(cell_pool); + cell_pool = NULL; + } } /** Free excess storage in cell pool. */