Fix double-free on unmatched logger error pattern
authorZachary Snow <zach@zachjs.com>
Wed, 24 Feb 2021 01:39:13 +0000 (20:39 -0500)
committerZachary Snow <zach@zachjs.com>
Wed, 24 Feb 2021 01:49:21 +0000 (20:49 -0500)
commit5e439b6e3fdb498c821cccfed456547e9568f47b
tree0b559fe4e7a2a3ce384afa42e77005ff1d231423
parentb05b98521c781fef0f9d900a53310cad9e1434b0
Fix double-free on unmatched logger error pattern

When an expected logger error pattern is unmatched, the logger raises
another (hidden) error. Because of the previous ordering of actions,
`logv_error_with_prefix()` would inadvertently invoke `yosys_atexit()`
twice, causing a double-free.
kernel/log.cc