thread-loop: set error correctly

This commit is contained in:
Wim Taymans 2019-06-07 13:39:25 +02:00
parent c6c9e6a8b3
commit a9808a3edb

View file

@ -132,8 +132,10 @@ struct pw_thread_loop *pw_thread_loop_new(struct pw_loop *loop,
CHECK(pthread_cond_init(&this->cond, &cattr), clean_lock);
CHECK(pthread_cond_init(&this->accept_cond, &cattr), clean_cond);
if ((this->event = pw_loop_add_event(this->loop, do_stop, this)) == NULL)
if ((this->event = pw_loop_add_event(this->loop, do_stop, this)) == NULL) {
res = -errno;
goto clean_acceptcond;
}
pw_loop_add_hook(loop, &this->hook, &impl_hooks, this);