From: Jan Kiszka <[email protected]>

probe_config_file does not care about mountpoint or not_mounted. We
rather corrupt the state because we free the mountpoint value
probe_config_file set and leak "tmpdir".

Signed-off-by: Jan Kiszka <[email protected]>
---
 tools/tests/test_probe_config_file.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/tools/tests/test_probe_config_file.c 
b/tools/tests/test_probe_config_file.c
index f1da154..3df0cf8 100644
--- a/tools/tests/test_probe_config_file.c
+++ b/tools/tests/test_probe_config_file.c
@@ -109,19 +109,9 @@ fake_mountpoint_error:

 bool __wrap_probe_config_file(CONFIG_PART *cp)
 {
-       bool ret;
        probe_config_file_call_count++;

-       if (asprintf(&cp->mountpoint, "tmpdir") == -1) {
-               cp->not_mounted = true;
-               cp->mountpoint = NULL;
-               return false;
-       }
-       cp->not_mounted = false;
-       ret =  __real_probe_config_file(cp);
-
-       free(cp->mountpoint);
-       return ret;
+       return  __real_probe_config_file(cp);
 }

 void delete_temp_files(void)
--
2.26.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/9c86d9c933a3b45d155e4d7eb725bb4cbffe6ab7.1592139558.git.jan.kiszka%40web.de.

Reply via email to