[PATCH] opcodes/loongarch: correct parse_loongarch_dis_option
Iru Cai
vimacs.hacks@gmail.com
Wed Aug 31 01:49:28 GMT 2022
parse_loongarch_dis_option() should return 0 when parsing a valid
option, which makes parse_loongarch_dis_options() continue parsing
and free the xmalloc'd memory.
---
opcodes/loongarch-dis.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/opcodes/loongarch-dis.c b/opcodes/loongarch-dis.c
index 9dcf989d0df..51c1f64edb5 100644
--- a/opcodes/loongarch-dis.c
+++ b/opcodes/loongarch-dis.c
@@ -92,7 +92,10 @@ parse_loongarch_dis_option (const char *option)
loongarch_r_disname = loongarch_r_normal_name;
loongarch_f_disname = loongarch_f_normal_name;
}
- return -1;
+ else
+ return -1;
+
+ return 0;
}
static int
--
2.37.2
On 2022/8/30 15:15, liuzhensong wrote:
>
> The format of this patch seems not a unified diff output, can not be
> patched directly. Do you mind remake?
>
More information about the Binutils
mailing list