[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1 3/7] plugins/hotblocks: Properly freed the hash table values
From: |
Alex Bennée |
Subject: |
[PATCH v1 3/7] plugins/hotblocks: Properly freed the hash table values |
Date: |
Wed, 5 May 2021 10:22:55 +0100 |
From: Mahmoud Mandour <ma.mandourr@gmail.com>
Freed the values stored in the hash table ``hotblocks``
returned by ``g_hash_table_get_values()`` by freeing the sorted
list and destroyed the hash table afterward.
Signed-off-by: Mahmoud Mandour <ma.mandourr@gmail.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20210422005043.3569-2-ma.mandourr@gmail.com>
---
contrib/plugins/hotblocks.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hotblocks.c
index 4b08340143..64692c0670 100644
--- a/contrib/plugins/hotblocks.c
+++ b/contrib/plugins/hotblocks.c
@@ -68,10 +68,11 @@ static void plugin_exit(qemu_plugin_id_t id, void *p)
rec->insns, rec->exec_count);
}
- g_list_free(it);
+ g_list_free_full(it, g_free);
g_mutex_unlock(&lock);
}
+ g_hash_table_destroy(hotblocks);
qemu_plugin_outs(report->str);
}
--
2.20.1
- [PATCH v1 0/7] plugins/next (windows, leaks, tcg tracing), Alex Bennée, 2021/05/05
- [PATCH v1 1/7] plugins: Update qemu-plugins.symbols to match qemu-plugins.h, Alex Bennée, 2021/05/05
- [PATCH v1 4/7] plugins/hotpages: Properly freed the hash table values, Alex Bennée, 2021/05/05
- [PATCH v1 2/7] plugins: Move all typedef and type declaration to the front of the qemu-plugin.h, Alex Bennée, 2021/05/05
- [PATCH v1 3/7] plugins/hotblocks: Properly freed the hash table values,
Alex Bennée <=
- [PATCH v1 7/7] tcg: add trace events for [exit|goto]_tb and goto_ptr, Alex Bennée, 2021/05/05
- [PATCH v1 5/7] docs: mark intention to deprecate TCG tracing functionality, Alex Bennée, 2021/05/05
- Re: [PATCH v1 5/7] docs: mark intention to deprecate TCG tracing functionality, Daniel P . Berrangé, 2021/05/05
- Re: [PATCH v1 5/7] docs: mark intention to deprecate TCG tracing functionality, Alex Bennée, 2021/05/05
- Re: [PATCH v1 5/7] docs: mark intention to deprecate TCG tracing functionality, Alex Bennée, 2021/05/05
- Re: [PATCH v1 5/7] docs: mark intention to deprecate TCG tracing functionality, Daniel P . Berrangé, 2021/05/05
- Re: [PATCH v1 5/7] docs: mark intention to deprecate TCG tracing functionality, Alex Bennée, 2021/05/17
- Re: [PATCH v1 5/7] docs: mark intention to deprecate TCG tracing functionality, Stefan Hajnoczi, 2021/05/17
[PATCH v1 6/7] scripts/tracetool: don't barf validating TCG types, Alex Bennée, 2021/05/05