[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 0/2] plugins: Freeing allocated values in hash tables.
From: |
Mahmoud Mandour |
Subject: |
[PATCH v2 0/2] plugins: Freeing allocated values in hash tables. |
Date: |
Thu, 22 Apr 2021 02:50:41 +0200 |
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
- [PATCH v2 0/2] plugins: Freeing allocated values in hash tables.,
Mahmoud Mandour <=