Module: xenomai-3 Branch: master Commit: e3ccc59ffb49661d1a21c9c637d320026069c73e URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=e3ccc59ffb49661d1a21c9c637d320026069c73e
Author: Philippe Gerum <r...@xenomai.org> Date: Sat Mar 7 19:01:28 2015 +0100 alchemy: fix internal error handling --- lib/alchemy/task.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/alchemy/task.c b/lib/alchemy/task.c index c9ec272..327e916 100644 --- a/lib/alchemy/task.c +++ b/lib/alchemy/task.c @@ -304,10 +304,9 @@ static int create_tcb(struct alchemy_task **tcbp, RT_TASK *task, warning("failed to export task %s to registry, %s", tcb->name, symerror(ret)); - if (syncluster_addobj(&alchemy_task_table, tcb->name, &tcb->cobj)) { - ret = -EEXIST; + ret = syncluster_addobj(&alchemy_task_table, tcb->name, &tcb->cobj); + if (ret) goto fail_register; - } if (task) task->handle = tcb->self.handle; @@ -320,7 +319,7 @@ fail_register: fail_threadinit: syncobj_uninit(&tcb->sobj_msg); fail_syncinit: - delete_tcb(tcb); + threadobj_free(&tcb->thobj); return ret; } _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git