From a2a65fe4570edb74cbf4e6b9e7f9e1ac794c04f5 Mon Sep 17 00:00:00 2001 From: TaeJun Kwon Date: Sat, 16 Sep 2017 00:57:36 +0900 Subject: [PATCH] Fix to prevent abort during mq_close --- framework/src/tinyalsa/tinyalsa.c | 1 - os/audio/audio.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/src/tinyalsa/tinyalsa.c b/framework/src/tinyalsa/tinyalsa.c index 6f09ce0..5b07140 100644 --- a/framework/src/tinyalsa/tinyalsa.c +++ b/framework/src/tinyalsa/tinyalsa.c @@ -734,7 +734,6 @@ int pcm_close(struct pcm *pcm) } } #endif - mq_close(pcm->mq); /* Close the message queue */ mq_unlink(pcm->mqname); if (pcm->fd >= 0) { diff --git a/os/audio/audio.c b/os/audio/audio.c index 6bf99eb..0bddceb 100644 --- a/os/audio/audio.c +++ b/os/audio/audio.c @@ -579,6 +579,7 @@ static int audio_ioctl(FAR struct file *filep, int cmd, unsigned long arg) case AUDIOIOC_UNREGISTERMQ: { audvdbg("AUDIOIOC_UNREGISTERMQ\n"); + mq_close(upper->usermq); /* Close the message queue */ upper->usermq = NULL; ret = OK; -- 2.7.4