mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-09-06 18:05:37 +00:00
plugins/cache: Fixed a bug with destroying FIFO metadata
This manifests itself when associativity degree is greater than the number of sets and FIFO is used, otherwise it's also a memory leak whenever FIFO was used. Signed-off-by: Mahmoud Mandour <ma.mandourr@gmail.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210714172151.8494-2-ma.mandourr@gmail.com> Message-Id: <20210720232703.10650-22-alex.bennee@linaro.org>
This commit is contained in:
parent
f7e68c9c99
commit
de9fc40f36
|
@ -200,7 +200,7 @@ static void fifo_destroy(Cache *cache)
|
|||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < cache->assoc; i++) {
|
||||
for (i = 0; i < cache->num_sets; i++) {
|
||||
g_queue_free(cache->sets[i].fifo_queue);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue