Commit 9e3cbdb1 authored by Philippe Gerum's avatar Philippe Gerum

alchemy/event: prevent double-free on error path

We don't want the finalizer to run for the underlying event object
when cleaning up upon error at creation. Call the uninit helper
instead.
parent 824d831c
......@@ -215,7 +215,7 @@ int rt_event_create(RT_EVENT *event, const char *name,
if (syncluster_addobj(&alchemy_event_table, evcb->name, &evcb->cobj)) {
registry_destroy_file(&evcb->fsobj);
eventobj_destroy(&evcb->evobj);
eventobj_uninit(&evcb->evobj);
xnfree(evcb);
ret = -EEXIST;
} else
......
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