summaryrefslogtreecommitdiff
path: root/src/ipc.c
diff options
context:
space:
mode:
authortangyuxin <[email protected]>2019-09-27 14:21:52 +0800
committertangyuxin <[email protected]>2019-09-27 14:21:52 +0800
commit255825835e7b89233844e93466e8b3ef51c870eb (patch)
tree3cccf7a182ea5f9976a79e6a3620930d49b1c112 /src/ipc.c
parent2a39e590244cc0a8501669e409c5b07fa4d33176 (diff)
[kernel][ipc] 修复创建0长度的消息队列宕机问题
Diffstat (limited to 'src/ipc.c')
-rw-r--r--src/ipc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ipc.c b/src/ipc.c
index 16d714b3f4..6a8234a747 100644
--- a/src/ipc.c
+++ b/src/ipc.c
@@ -1900,7 +1900,7 @@ rt_mq_t rt_mq_create(const char *name,
mq->msg_pool = RT_KERNEL_MALLOC((mq->msg_size + sizeof(struct rt_mq_message)) * mq->max_msgs);
if (mq->msg_pool == RT_NULL)
{
- rt_mq_delete(mq);
+ rt_object_delete(&(mq->parent.parent));
return RT_NULL;
}