Cache: Plug some leaks
This commit is contained in:
8
server/modules/filter/cache/lrustorage.cc
vendored
8
server/modules/filter/cache/lrustorage.cc
vendored
@ -25,6 +25,14 @@ LRUStorage::LRUStorage(Storage* pstorage, size_t max_count, size_t max_size)
|
|||||||
|
|
||||||
LRUStorage::~LRUStorage()
|
LRUStorage::~LRUStorage()
|
||||||
{
|
{
|
||||||
|
Node* pnode = phead_;
|
||||||
|
|
||||||
|
while (phead_)
|
||||||
|
{
|
||||||
|
free_node(phead_); // Adjusts phead_
|
||||||
|
}
|
||||||
|
|
||||||
|
delete pstorage_;
|
||||||
}
|
}
|
||||||
|
|
||||||
cache_result_t LRUStorage::get_key(const char* zdefault_db,
|
cache_result_t LRUStorage::get_key(const char* zdefault_db,
|
||||||
|
|||||||
1
server/modules/filter/cache/storagereal.cc
vendored
1
server/modules/filter/cache/storagereal.cc
vendored
@ -25,6 +25,7 @@ StorageReal::StorageReal(CACHE_STORAGE_API* pApi, CACHE_STORAGE* pStorage)
|
|||||||
|
|
||||||
StorageReal::~StorageReal()
|
StorageReal::~StorageReal()
|
||||||
{
|
{
|
||||||
|
m_pApi->freeInstance(m_pStorage);
|
||||||
}
|
}
|
||||||
|
|
||||||
cache_result_t StorageReal::get_info(uint32_t flags, json_t** ppInfo) const
|
cache_result_t StorageReal::get_info(uint32_t flags, json_t** ppInfo) const
|
||||||
|
|||||||
Reference in New Issue
Block a user