An invalid known_network.freq file containing several UUID
groups which have the same 'name' key results in memory leaks
in IWD. This is because the file is loaded and the group's
are iterated without detecting duplicates. This leads to the
same network_info's known_frequencies being set/overridden
multiple times.
To fix this we just check if the network_info already has a
UUID set. If so remove the stale entry.
---
src/knownnetworks.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/knownnetworks.c b/src/knownnetworks.c
index 53cfc30f..32beae84 100644
--- a/src/knownnetworks.c
+++ b/src/knownnetworks.c
@@ -916,6 +916,11 @@ static int known_network_frequencies_load(void)
if (!info)
continue;
+ if (info->has_uuid) {
+ l_settings_remove_group(known_freqs, groups[i]);
+ continue;
+ }
+
freq_list = l_settings_get_string(known_freqs, groups[i],
"list");
if (!freq_list)
--
2.26.2
Show replies by date