From 348143eb6c82043ad824e6dcc31ba1886176ce1c Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Wed, 19 Oct 2016 11:00:26 +0300 Subject: [PATCH] Remove too aggressive assert --- server/modules/filter/cache/cache.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/modules/filter/cache/cache.c b/server/modules/filter/cache/cache.c index d0d76c0cd..15e9aa9dc 100644 --- a/server/modules/filter/cache/cache.c +++ b/server/modules/filter/cache/cache.c @@ -621,7 +621,10 @@ static void cache_session_data_free(CACHE_SESSION_DATA* data) { if (data) { - ss_dassert(!data->use_db); + // In normal circumstances, only data->default_db may be non-NULL at + // this point. However, if the authentication with the backend fails + // and the session is closed, data->use_db may be non-NULL. + MXS_FREE(data->use_db); MXS_FREE(data->default_db); MXS_FREE(data); }