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:
@ -163,6 +163,10 @@ int CacheFilterSession::routeQuery(GWBUF* pPacket)
|
|||||||
{
|
{
|
||||||
MXS_NOTICE("Cache data is stale, fetching fresh from server.");
|
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;
|
m_refreshing = true;
|
||||||
fetch_from_server = true;
|
fetch_from_server = true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user