diff --git a/server/modules/filter/cache/lrustorage.cc b/server/modules/filter/cache/lrustorage.cc index a1454929b..9523597ef 100644 --- a/server/modules/filter/cache/lrustorage.cc +++ b/server/modules/filter/cache/lrustorage.cc @@ -551,11 +551,6 @@ cache_result_t LRUStorage::get_new_node(const CACHE_KEY& key, mxb_assert(m_stats.items == m_max_count); pNode = vacate_lru(); } - - if (!pNode) - { - result = CACHE_RESULT_ERROR; - } } else { @@ -578,6 +573,10 @@ cache_result_t LRUStorage::get_new_node(const CACHE_KEY& key, result = CACHE_RESULT_OUT_OF_RESOURCES; } } + else + { + result = CACHE_RESULT_ERROR; + } if (CACHE_RESULT_IS_OK(result)) {