All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] plugins: Freeing allocated values in hash tables.
@ 2021-04-22  0:50 Mahmoud Mandour
  2021-04-22  0:50 ` [PATCH v2 1/2] plugins/hotblocks: Properly freed the hash table values Mahmoud Mandour
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mahmoud Mandour @ 2021-04-22  0:50 UTC (permalink / raw)
  To: qemu-devel; +Cc: Mahmoud Mandour

A hash table made using ``g_hash_table_new`` requires manually
freeing any dynamically allocated keys/values. The two patches
in this series fixes this issue in hotblocks and hotpages plugins.

v1 -> v2: Added a freeing function to hotpages instead of freeing
    the sorted list. That's probably better because the sorted list
    is only made on having ``counts != NULL`` and ``counts`` has a next
    pointer so essentially at least 2 elements in the list.

Mahmoud Mandour (2):
  plugins/hotblocks: Properly freed the hash table values
  plugins/hotpages: Properly freed the hash table values

 contrib/plugins/hotblocks.c | 3 ++-
 contrib/plugins/hotpages.c  | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

-- 
2.25.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-04-26 16:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-22  0:50 [PATCH v2 0/2] plugins: Freeing allocated values in hash tables Mahmoud Mandour
2021-04-22  0:50 ` [PATCH v2 1/2] plugins/hotblocks: Properly freed the hash table values Mahmoud Mandour
2021-04-22  0:50 ` [PATCH v2 2/2] plugins/hotpages: " Mahmoud Mandour
2021-04-26 16:57 ` [PATCH v2 0/2] plugins: Freeing allocated values in hash tables Alex Bennée

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.