Commit 680557ab authored by Philipp Schafft's avatar Philipp Schafft 🦁

Fix: Ensure we have a look while accessing self->module in modulecontainer

parent 630ac9e4
Pipeline #288 failed with stage
in 11 seconds
......@@ -106,9 +106,11 @@ module_t * module_container_get_module(module_container_t *self, co
search = refobject_new(sizeof(refobject_base_t), NULL, NULL, name, NULL);
thread_mutex_lock(&(self->lock));
if (avl_get_by_key(self->module, REFOBJECT_TO_TYPE(search, void *), (void**)&ret) != 0) {
ret = NULL;
}
thread_mutex_unlock(&(self->lock));
refobject_unref(search);
refobject_ref(ret);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment