|
| From: | Gavin Shan |
| Subject: | Re: [PATCH for-9.2] hw/arm/sbsa-ref: Don't leak string in sbsa_fdt_add_gic_node() |
| Date: | Tue, 27 Aug 2024 14:38:03 +1000 |
| User-agent: | Mozilla Thunderbird |
On 8/23/24 2:23 AM, Peter Maydell wrote:
In sbsa_fdt_add_gic_node() we g_strdup_printf() two nodename strings, but only free one. Since the string is actually entirely constant and we don't make any use of printf's format-string operations, we can drop the g_strdup_printf() use entirely. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> --- A small once-only leak, so this is 9.2 material. Spotted with clang leak-sanitizer. hw/arm/sbsa-ref.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-)
Reviewed-by: Gavin Shan <gshan@redhat.com>
| [Prev in Thread] | Current Thread | [Next in Thread] |