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.
Signed-off-by: Felix Moessbauer <[email protected]> --- 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 -- You received this message because you are subscribed to the Google Groups "EFI Boot Guard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/efibootguard-dev/20231017103428.129864-1-felix.moessbauer%40siemens.com.
