match: fix false-positive use-after-free after failed reallocarray()
Before adoption: this commit came in with the history the project adopted, so no landing records it.
With GCC 14.2.0 on Debian sid, fuzzel fails to build [1] on some non-x86 archs [2] due to a false-positive use-after-free error for free(tokens) or free(tok_lengths), in the case where the corresponding reallocarray() call fails. Revise error handling to free() immediately after a failing reallocarray(), so that GCC follows that the calls to free() are valid. [1] https://buildd.debian.org/status/fetch.php?pkg=fuzzel&arch=riscv64&ver=1.11.1%2Bds-1&stamp=1726441493&raw=0 [2] loong64, m68k, mips64el, powerpc, ppc64, ppc64el, riscv64, and s390x.
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
1 file+13 added−23 removed
- other:+13 added−23 removed