From: Alan Modra Date: Fri, 17 Dec 2021 04:24:54 +0000 (+1030) Subject: asan: abort in wasm_scan_name_function_section X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cfabce5ba10ea15158c78bdac732425a46057e42;p=binutils-gdb.git asan: abort in wasm_scan_name_function_section Macros like READ_LEB128 in wasm-module.c that alter control flow are evil. Maintainers will break your code if you have hidden ways to reach labels. * wasm-module.c (wasm_scan_name_function_section): Don't attempt to bfd_release NULL. --- diff --git a/bfd/wasm-module.c b/bfd/wasm-module.c index 9735ebeabca..ca7e38179e9 100644 --- a/bfd/wasm-module.c +++ b/bfd/wasm-module.c @@ -357,7 +357,8 @@ wasm_scan_name_function_section (bfd *abfd, sec_ptr asect) return true; error_return: - bfd_release (abfd, symbols); + if (symbols) + bfd_release (abfd, symbols); return false; }