From 644e400cd1f8a80df01b4f1755450f86709485f4 Mon Sep 17 00:00:00 2001 From: Lei Zhu Date: Mon, 21 Jul 2025 12:24:49 +0000 Subject: [PATCH] 8362611: [GCC static analyzer] memory leak in ps_core.c core_handle_note Reviewed-by: dholmes, mbaesken --- src/jdk.hotspot.agent/linux/native/libsaproc/ps_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jdk.hotspot.agent/linux/native/libsaproc/ps_core.c b/src/jdk.hotspot.agent/linux/native/libsaproc/ps_core.c index 808ef42e069..c3aaaf440a3 100644 --- a/src/jdk.hotspot.agent/linux/native/libsaproc/ps_core.c +++ b/src/jdk.hotspot.agent/linux/native/libsaproc/ps_core.c @@ -286,7 +286,7 @@ static bool core_handle_note(struct ps_prochandle* ph, ELF_PHDR* note_phdr) { if (notep->n_type == NT_PRSTATUS) { if (core_handle_prstatus(ph, descdata, notep->n_descsz) != true) { print_error("failed to handle NT_PRSTATUS note\n"); - return false; + goto err; } } else if (notep->n_type == NT_AUXV) { // Get first segment from entry point