Skip to content

Commit dca7eed

Browse files
committed
exit_uv: abort if state == 0
It used to crash on NULL pointer dereference, anyways, so make this just explicit. Also use ERROR to comply with the abort.
1 parent 9c7dc9e commit dca7eed

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/host.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,8 @@ void destroy_root_module(struct module *root_mod) {
694694
*/
695695
void exit_uv(int status) {
696696
if (!state_root_static) {
697-
log_msg(LOG_LEVEL_WARNING, "%s called without state registered.\n", __func__);
697+
MSG(ERROR, "%s called without state registered.\n", __func__);
698+
abort();
698699
}
699700
state_root_static->exit_status = status;
700701
state_root_static->broadcast_should_exit();

0 commit comments

Comments
 (0)