Cache: Plug a leak

In case the stale item must be refreshed, the stale value must be
freed as it will not be sent to the client.
This commit is contained in:
Johan Wikman
2016-12-22 16:30:00 +02:00
parent bc496e94bb
commit 91dd2d9fb8

View File

@ -163,6 +163,10 @@ int CacheFilterSession::routeQuery(GWBUF* pPacket)
{
MXS_NOTICE("Cache data is stale, fetching fresh from server.");
}
// As we don't use the response it must be freed.
gwbuf_free(pResponse);
m_refreshing = true;
fetch_from_server = true;
}