提交 25582583 编写于 作者: 还_没_想_好's avatar 还_没_想_好

[kernel][ipc] 修复创建0长度的消息队列宕机问题

上级 2a39e590
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册