Explorar el Código

Merge pull request #3108 from enkiller/master

[kernel][ipc] 修复创建0长度的消息队列宕机问题
Bernard Xiong hace 5 años
padre
commit
413fcba30a
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/ipc.c

+ 1 - 1
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;
     }