Skip to contentSkip to conversation

qtest: bios-tables-test: fix a memory leak

PATCH In review Li Qiang 3 participants 3 messages Jul 14, 2020 – Jul 15, 2020

lore
Share & tools
lore

Li Qiang

author
#0 lore raw

PATCH 1/1 qtest: bios-tables-test: fix a memory leak

Fixes 5da7c35e25a("bios-tables-test: Add Q35/TPM-TIS test")
---
 tests/qtest/bios-tables-test.c | 1 +
 1 file changed, 1 insertion(+)
tests/qtest/bios-tables-test.c +1 -0
index c315156858..d49b3988ec 100644
@@ -924,6 +924,7 @@ static void test_acpi_tcg_tpm(const char *machine, const char *tpm_if,
     g_free(variant);
     g_free(tmp_path);
     g_free(tmp_dir_name);
+    g_free(args);
     free_test_data(&data);
 #else
     g_test_skip("TPM disabled");
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw

Hi Li,

Quoted 12 lines · Li Qiang
Fixes 5da7c35e25a("bios-tables-test: Add Q35/TPM-TIS test")
---
 tests/qtest/bios-tables-test.c | 1 +
 1 file changed, 1 insertion(+)
tests/qtest/bios-tables-test.c +0 -0
index c315156858..d49b3988ec 100644

tests/qtest/bios-tables-test.c static void test_acpi_tcg_tpm(const char *machine, const char *tpm_if, · line 930

Quoted 7 lines
tests/qtest/bios-tables-test.c +1 -0
@@ -924,6 +924,7 @@ static void test_acpi_tcg_tpm(const char *machine, const char *tpm_if,
     g_free(variant);
     g_free(tmp_path);
     g_free(tmp_dir_name);
+    g_free(args);
     free_test_data(&data);
 #else
     g_test_skip("TPM disabled");

Thanks!

Eric

Reviewed-by on v1 1/1
#2 lore raw
In reply to Li Qiang
Quoted 2 lines · On Tue, 14 Jul 2020 08:35:36 -0700 Li Qiang <[email protected]> wrote:
Fixes 5da7c35e25a("bios-tables-test: Add Q35/TPM-TIS test")
Quoted 16 lines
---
 tests/qtest/bios-tables-test.c | 1 +
 1 file changed, 1 insertion(+)
tests/qtest/bios-tables-test.c +1 -0
index c315156858..d49b3988ec 100644
@@ -924,6 +924,7 @@ static void test_acpi_tcg_tpm(const char *machine, const char *tpm_if,
     g_free(variant);
     g_free(tmp_path);
     g_free(tmp_dir_name);
+    g_free(args);
     free_test_data(&data);
 #else
     g_test_skip("TPM disabled");