[binutils-gdb/binutils-2_43-branch] libctf, open: Fix enum error handling path
Nick Alcock
nix@sourceware.org
Thu Aug 1 14:42:35 GMT 2024
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ab612a67a2d6bd2559835159a733f06f90d6b6f8
commit ab612a67a2d6bd2559835159a733f06f90d6b6f8
Author: Nick Alcock <nick.alcock@oracle.com>
Date: Mon Jul 15 21:05:43 2024 +0100
libctf, open: Fix enum error handling path
This new error-handling path was not properly initializing the
fp's errno.
libctf/
* ctf-open.c (init_static_types_internal): Set errno properly.
Diff:
---
libctf/ctf-open.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libctf/ctf-open.c b/libctf/ctf-open.c
index fd6d36edc46..ab97cde3ebf 100644
--- a/libctf/ctf-open.c
+++ b/libctf/ctf-open.c
@@ -1066,6 +1066,7 @@ init_static_types_internal (ctf_dict_t *fp, ctf_header_t *cth,
continue;
enum_err:
+ ctf_set_errno (fp, err);
ctf_next_destroy (i_constants);
ctf_next_destroy (i);
return ctf_errno (fp);
More information about the Binutils-cvs
mailing list