Browse Source

rtgui_system: always detach ack_mb in rtgui_thread_send_sync

The old code won't detach ack_mb if error occurs. Fix it.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1807 bbd45198-f89e-11dd-88c7-29a3b14d5316
chaos.proton@gmail.com 13 years ago
parent
commit
e834b94805
1 changed files with 1 additions and 1 deletions
  1. 1 1
      components/rtgui/common/rtgui_system.c

+ 1 - 1
components/rtgui/common/rtgui_system.c

@@ -430,10 +430,10 @@ rt_err_t rtgui_thread_send_sync(rt_thread_t tid, rtgui_event_t* event, rt_size_t
 	else
 	else
 		r = RT_EOK;
 		r = RT_EOK;
 
 
+__return:
 	/* fini ack mailbox */
 	/* fini ack mailbox */
 	rt_mb_detach(&ack_mb);
 	rt_mb_detach(&ack_mb);
 
 
-__return:
 	return r;
 	return r;
 }
 }