Felix Moessbauer
unread,Oct 17, 2023, 6:34:44 AM10/17/23Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to efibootg...@googlegroups.com, jan.k...@siemens.com, michae...@siemens.com, Felix Moessbauer
When probing partitions, the mountpoint string is allocated on the heap.
Normally the mountpoint is freed during unmounting. But for partitions
that are already mounted, we also need to free the mountpoint str.
Changes since v1:
- fix leak at correct location
env/env_config_file.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/env/env_config_file.c b/env/env_config_file.c
index e270fbb..adb7a06 100644
--- a/env/env_config_file.c
+++ b/env/env_config_file.c
@@ -98,6 +98,8 @@ bool probe_config_file(CONFIG_PART *cfgpart)
}
if (do_unmount) {
unmount_partition(cfgpart);
+ } else {
+ free(cfgpart->mountpoint);
}
return result;
}
--
2.39.2