qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@redhat.com>
To: qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: "Fabiano Rosas" <farosas@suse.de>,
	"Jamin Lin" <jamin_lin@aspeedtech.com>,
	"Cédric Le Goater" <clg@redhat.com>
Subject: [PULL 01/39] tests/qtest/ast2700-smc-test: Fix leak
Date: Mon, 26 May 2025 10:04:34 +0200	[thread overview]
Message-ID: <20250526080512.1697528-2-clg@redhat.com> (raw)
In-Reply-To: <20250526080512.1697528-1-clg@redhat.com>

From: Fabiano Rosas <farosas@suse.de>

ASAN spotted a leak of the memory used to hold the tmp_path:

Direct leak of 35 byte(s) in 1 object(s) allocated from:
    #0 0x55e29aa96da9 in malloc ../projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:69:3
    #1 0x7fe0cfb26518 in g_malloc ../glib/gmem.c:106
    #2 0x7fe0cfb4146e in g_strconcat ../glib/gstrfuncs.c:629
    #3 0x7fe0cfb0a78f in g_get_tmp_name ../glib/gfileutils.c:1742
    #4 0x7fe0cfb0b00b in g_file_open_tmp ../glib/gfileutils.c:1802
    #5 0x55e29ab53961 in test_ast2700_evb ../tests/qtest/ast2700-smc-test.c:20:10
    #6 0x55e29ab53803 in main ../tests/qtest/ast2700-smc-test.c:65:5
    #7 0x7fe0cf7bd24c in __libc_start_main ../csu/libc-start.c:308
    #8 0x55e29a9f7759 in _start ../sysdeps/x86_64/start.S:120

Signed-off-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Jamin Lin <jamin_lin@aspeedtech.com>
Message-ID: <20250509175047.26066-1-farosas@suse.de>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
---
 tests/qtest/ast2700-smc-test.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/qtest/ast2700-smc-test.c b/tests/qtest/ast2700-smc-test.c
index d1c485630744..62d538d8a3a7 100644
--- a/tests/qtest/ast2700-smc-test.c
+++ b/tests/qtest/ast2700-smc-test.c
@@ -67,5 +67,6 @@ int main(int argc, char **argv)
 
     qtest_quit(ast2700_evb_data.s);
     unlink(ast2700_evb_data.tmp_path);
+    g_free(ast2700_evb_data.tmp_path);
     return ret;
 }
-- 
2.49.0



  reply	other threads:[~2025-05-26  8:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-26  8:04 [PULL 00/39] aspeed queue Cédric Le Goater
2025-05-26  8:04 ` Cédric Le Goater [this message]
2025-05-26  8:04 ` [PULL 02/39] tests/qtest/aspeed_smc-test: Fix memory leaks Cédric Le Goater
2025-05-26  8:04 ` [PULL 03/39] hw/misc/aspeed_hace: Remove unused code for better readability Cédric Le Goater
2025-05-26  8:04 ` [PULL 04/39] hw/misc/aspeed_hace: Improve readability and consistency in variable naming Cédric Le Goater
2025-05-26  8:04 ` [PULL 05/39] hw/misc/aspeed_hace: Ensure HASH_IRQ is always set to prevent firmware hang Cédric Le Goater
2025-05-26  8:04 ` [PULL 06/39] hw/misc/aspeed_hace: Extract direct mode hash buffer setup into helper function Cédric Le Goater
2025-05-26  8:04 ` [PULL 07/39] hw/misc/aspeed_hace: Extract SG-mode " Cédric Le Goater
2025-05-26  8:04 ` [PULL 08/39] hw/misc/aspeed_hace: Extract digest write and iov unmap " Cédric Le Goater
2025-05-26  8:04 ` [PULL 09/39] hw/misc/aspeed_hace: Extract non-accumulation hash execution " Cédric Le Goater
2025-05-26 18:05 ` [PULL 00/39] aspeed queue Stefan Hajnoczi

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=20250526080512.1697528-2-clg@redhat.com \
    --to=clg@redhat.com \
    --cc=farosas@suse.de \
    --cc=jamin_lin@aspeedtech.com \
    --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).