[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 20/20] target/i386/sev: Plug memleak in sev_read_file_base64
From: |
Eduardo Habkost |
Subject: |
[PULL 20/20] target/i386/sev: Plug memleak in sev_read_file_base64 |
Date: |
Wed, 2 Sep 2020 07:53:23 -0400 |
From: Pan Nengyuan <pannengyuan@huawei.com>
Missing g_error_free() in sev_read_file_base64() error path.
Fix that.
Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Message-Id: <20200831134315.1221-5-pannengyuan@huawei.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
target/i386/sev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/target/i386/sev.c b/target/i386/sev.c
index c3ecf86704..de4818da6d 100644
--- a/target/i386/sev.c
+++ b/target/i386/sev.c
@@ -500,6 +500,7 @@ sev_read_file_base64(const char *filename, guchar **data,
gsize *len)
if (!g_file_get_contents(filename, &base64, &sz, &error)) {
error_report("failed to read '%s' (%s)", filename, error->message);
+ g_error_free(error);
return -1;
}
--
2.26.2
- [PULL 11/20] Revert "target/i386: Enable new apic id encoding for EPYC based cpus models", (continued)
- [PULL 11/20] Revert "target/i386: Enable new apic id encoding for EPYC based cpus models", Eduardo Habkost, 2020/09/02
- [PULL 12/20] Revert "hw/i386: Move arch_id decode inside x86_cpus_init", Eduardo Habkost, 2020/09/02
- [PULL 10/20] Revert "i386: Fix pkg_id offset for EPYC cpu models", Eduardo Habkost, 2020/09/02
- [PULL 14/20] Revert "hw/i386: Introduce apicid functions inside X86MachineState", Eduardo Habkost, 2020/09/02
- [PULL 13/20] Revert "i386: Introduce use_epyc_apic_id_encoding in X86CPUDefinition", Eduardo Habkost, 2020/09/02
- [PULL 16/20] Revert "hw/386: Add EPYC mode topology decoding functions", Eduardo Habkost, 2020/09/02
- [PULL 17/20] Revert "hw/i386: Update structures to save the number of nodes per package", Eduardo Habkost, 2020/09/02
- [PULL 15/20] Revert "target/i386: Cleanup and use the EPYC mode topology functions", Eduardo Habkost, 2020/09/02
- [PULL 18/20] virtio: add Virtio*BusClass sizes, Eduardo Habkost, 2020/09/02
- [PULL 19/20] target/i386/cpu: Fix memleak in x86_cpu_class_check_missing_features, Eduardo Habkost, 2020/09/02
- [PULL 20/20] target/i386/sev: Plug memleak in sev_read_file_base64,
Eduardo Habkost <=
- Re: [PULL 00/20] x86 and machine queue, 2020-09-02, Peter Maydell, 2020/09/02