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