qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Tong Ho <tong.ho@xilinx.com>
To: <qemu-arm@nongnu.org>
Cc: edgar.iglesias@gmail.com, alistair@alistair23.me,
	tong.ho@xilinx.com, qemu-devel@nongnu.org,
	peter.maydell@linaro.org
Subject: [PATCH 1/3] hw/nvram: Fix Memory Leak in Xilinx eFuse QOM
Date: Fri, 15 Oct 2021 13:35:30 -0700	[thread overview]
Message-ID: <20211015203532.2463705-2-tong.ho@xilinx.com> (raw)
In-Reply-To: <20211015203532.2463705-1-tong.ho@xilinx.com>

Signed-off-by: Tong Ho <tong.ho@xilinx.com>
---
 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 ee1caab54c..a0fd77b586 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.25.1



  reply	other threads:[~2021-10-15 20:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-15 20:35 [PATCH 0/3] hw/nvram: Fix Memory Leaks in Xilinx eFUSE Tong Ho
2021-10-15 20:35 ` Tong Ho [this message]
2021-10-18 11:21   ` [PATCH 1/3] hw/nvram: Fix Memory Leak in Xilinx eFuse QOM Francisco Iglesias
2021-10-15 20:35 ` [PATCH 2/3] hw/nvram: Fix Memory Leak in Xilinx Versal eFuse device Tong Ho
2021-10-18 11:21   ` Francisco Iglesias
2021-10-15 20:35 ` [PATCH 3/3] hw/nvram: Fix Memory Leak in Xilinx ZynqMP " Tong Ho
2021-10-18 11:22   ` Francisco Iglesias
2021-10-18 10:31 ` [PATCH 0/3] hw/nvram: Fix Memory Leaks in Xilinx eFUSE Philippe Mathieu-Daudé
2021-10-18 16:20   ` Edgar E. Iglesias
2021-10-19  7:53 ` Laurent Vivier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211015203532.2463705-2-tong.ho@xilinx.com \
    --to=tong.ho@xilinx.com \
    --cc=alistair@alistair23.me \
    --cc=edgar.iglesias@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).