[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 06/11] hw/nvram: Fix Memory Leak in Xilinx eFuse QOM
From: |
Laurent Vivier |
Subject: |
[PULL 06/11] hw/nvram: Fix Memory Leak in Xilinx eFuse QOM |
Date: |
Sat, 23 Oct 2021 20:31:18 +0200 |
From: Tong Ho <tong.ho@xilinx.com>
Signed-off-by: Tong Ho <tong.ho@xilinx.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Reviewed-by: Francisco Iglesias <frasse.iglesias@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20211015203532.2463705-2-tong.ho@xilinx.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
hw/nvram/xlnx-efuse.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/hw/nvram/xlnx-efuse.c b/hw/nvram/xlnx-efuse.c
index ee1caab54cba..a0fd77b586dc 100644
--- a/hw/nvram/xlnx-efuse.c
+++ b/hw/nvram/xlnx-efuse.c
@@ -144,10 +144,11 @@ static bool efuse_ro_bits_find(XlnxEFuse *s, uint32_t k)
bool xlnx_efuse_set_bit(XlnxEFuse *s, unsigned int bit)
{
if (efuse_ro_bits_find(s, bit)) {
+ g_autofree char *path = object_get_canonical_path(OBJECT(s));
+
qemu_log_mask(LOG_GUEST_ERROR, "%s: WARN: "
"Ignored setting of readonly efuse bit<%u,%u>!\n",
- object_get_canonical_path(OBJECT(s)),
- (bit / 32), (bit % 32));
+ path, (bit / 32), (bit % 32));
return false;
}
@@ -202,9 +203,11 @@ static void efuse_realize(DeviceState *dev, Error **errp)
efuse_ro_bits_sort(s);
if ((s->efuse_size % 32) != 0) {
+ g_autofree char *path = object_get_canonical_path(OBJECT(s));
+
error_setg(errp,
"%s.efuse-size: %u: property value not multiple of 32.",
- object_get_canonical_path(OBJECT(dev)), s->efuse_size);
+ path, s->efuse_size);
return;
}
--
2.31.1
- [PULL 00/11] Trivial branch for 6.2 patches, Laurent Vivier, 2021/10/23
- [PULL 01/11] po: update turkish translation, Laurent Vivier, 2021/10/23
- [PULL 04/11] MAINTAINERS: Add myself as reviewer of 'Machine core' API, Laurent Vivier, 2021/10/23
- [PULL 05/11] softmmu/physmem.c: Fix typo in comment, Laurent Vivier, 2021/10/23
- [PULL 11/11] analyze-migration.py: fix extract contents ('-x') errors, Laurent Vivier, 2021/10/23
- [PULL 10/11] analyze-migration.py: fix a long standing typo, Laurent Vivier, 2021/10/23
- [PULL 09/11] README: Fix some documentation URLs, Laurent Vivier, 2021/10/23
- [PULL 03/11] disas/nios2: Simplify endianess conversion, Laurent Vivier, 2021/10/23
- [PULL 07/11] hw/nvram: Fix Memory Leak in Xilinx Versal eFuse device, Laurent Vivier, 2021/10/23
- [PULL 02/11] disas/nios2: Fix style in print_insn_nios2(), Laurent Vivier, 2021/10/23
- [PULL 06/11] hw/nvram: Fix Memory Leak in Xilinx eFuse QOM,
Laurent Vivier <=
- [PULL 08/11] hw/nvram: Fix Memory Leak in Xilinx ZynqMP eFuse device, Laurent Vivier, 2021/10/23
- Re: [PULL 00/11] Trivial branch for 6.2 patches, Richard Henderson, 2021/10/23