summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorMahmoud Mandour2021-07-21 01:26:55 +0200
committerAlex Bennée2021-07-23 18:22:16 +0200
commitde9fc40f36ab8e696d1c69727e80a80c46f20978 (patch)
treef493505e0e0a19c713fb7af677bd61840c682323 /contrib
parenttcg/plugins: implement a qemu_plugin_user_exit helper (diff)
downloadqemu-de9fc40f36ab8e696d1c69727e80a80c46f20978.tar.gz
qemu-de9fc40f36ab8e696d1c69727e80a80c46f20978.tar.xz
qemu-de9fc40f36ab8e696d1c69727e80a80c46f20978.zip
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>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/plugins/cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c
index bf0d2f6097..4a71602639 100644
--- a/contrib/plugins/cache.c
+++ b/contrib/plugins/cache.c
@@ -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);
}
}