Module: xenomai-forge Branch: master Commit: 7aebd8a8202191c891e4f2ff22344d15baa58090 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=7aebd8a8202191c891e4f2ff22344d15baa58090
Author: Philippe Gerum <[email protected]> Date: Sun Nov 13 15:36:52 2011 +0100 alchemy/task: fix error path on bad flowid in rt_task_reply() --- lib/alchemy/task.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/alchemy/task.c b/lib/alchemy/task.c index 8d4b921..1454b3d 100644 --- a/lib/alchemy/task.c +++ b/lib/alchemy/task.c @@ -885,12 +885,10 @@ int rt_task_reply(int flowid, RT_TASK_MCB *mcb_s) syncobj_for_each_waiter(¤t->sobj_msg, thobj) { wait = threadobj_get_wait(thobj); if (wait->request.flowid == flowid) - break; + goto reply; } - - if (wait == NULL) - goto done; - + goto done; + reply: size = mcb_s ? mcb_s->size : 0; syncobj_wakeup_waiter(¤t->sobj_msg, thobj); mcb_r = &wait->reply; _______________________________________________ Xenomai-git mailing list [email protected] https://mail.gna.org/listinfo/xenomai-git
