[binutils-gdb/binutils-2_43-branch] libctf: link: fix error handling

Nick Alcock nix@sourceware.org
Thu Aug 1 14:42:40 GMT 2024


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0eea22de3852ba0fe61ccb012936f67713120a6d

commit 0eea22de3852ba0fe61ccb012936f67713120a6d
Author: Nick Alcock <nick.alcock@oracle.com>
Date:   Mon Jul 15 22:05:57 2024 +0100

    libctf: link: fix error handling
    
    We were calling the wrong error function if opening failed, causing leaks.
    
    libctf/
            * ctf-link.c (ctf_link_deduplicating_per_cu): Fix error handling.

Diff:
---
 libctf/ctf-link.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libctf/ctf-link.c b/libctf/ctf-link.c
index 42b2911e4f2..7b68d709628 100644
--- a/libctf/ctf-link.c
+++ b/libctf/ctf-link.c
@@ -1221,7 +1221,7 @@ ctf_link_deduplicating_per_cu (ctf_dict_t *fp)
 							&parents)) == NULL)
 	{
 	  ctf_next_destroy (i);
-	  goto err_inputs;
+	  goto err_open_inputs;
 	}
 
       if ((out = ctf_create (&err)) == NULL)


More information about the Binutils-cvs mailing list