From e586f869184769fed41f7c95c895d8d1802588fc Mon Sep 17 00:00:00 2001 From: chao an Date: Wed, 14 Sep 2022 15:20:35 +0800 Subject: [PATCH] sched/mqueue: fix resource leak in mq_timedsend() Signed-off-by: chao an --- sched/mqueue/mq_timedsend.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sched/mqueue/mq_timedsend.c b/sched/mqueue/mq_timedsend.c index b671a7fb50..b8a90d44e7 100644 --- a/sched/mqueue/mq_timedsend.c +++ b/sched/mqueue/mq_timedsend.c @@ -239,6 +239,7 @@ int file_mq_timedsend(FAR struct file *mq, FAR const char *msg, if (ret != OK) { ret = -ret; + nxmq_free_msg(mqmsg); goto errout_in_critical_section; }