sched/mqueue: fix resource leak in mq_timedsend()

Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
chao an 2022-09-14 15:20:35 +08:00 committed by Xiang Xiao
parent f69251151e
commit e586f86918
1 changed files with 1 additions and 0 deletions

View File

@ -239,6 +239,7 @@ int file_mq_timedsend(FAR struct file *mq, FAR const char *msg,
if (ret != OK) if (ret != OK)
{ {
ret = -ret; ret = -ret;
nxmq_free_msg(mqmsg);
goto errout_in_critical_section; goto errout_in_critical_section;
} }