[12/19] libctf: link: fix error handling

Message ID 20240730153707.168357-13-nick.alcock@oracle.com
State New
Headers
Series libctf: various bugfixes (including a write into freed memory), and loosen constraints on enums |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 fail Patch failed to apply

Commit Message

Nick Alcock July 30, 2024, 3:37 p.m. UTC
  We were calling the wrong error function if opening failed, causing leaks.

libctf/
	* ctf-link.c (ctf_link_deduplicating_per_cu): Fix error handling.
---
 libctf/ctf-link.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

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)