OSDN Git Service

pcm: Fix memory leak at snd_pcm_new when THREAD_SAVE_API is defined
authorchunxu.li <chunxuxiao@gmail.com>
Mon, 27 Apr 2020 13:27:42 +0000 (21:27 +0800)
committerJaroslav Kysela <perex@perex.cz>
Mon, 8 Jun 2020 08:04:18 +0000 (10:04 +0200)
commit515b336801b3ad1838723e2084683f09eeccfb23
treee6ce46a2fcc0b4a100ee70300091ddb60be7ee97
parent6fad36dd383913289c7f0cd44982c22d4e55f706
pcm: Fix memory leak at snd_pcm_new when THREAD_SAVE_API is defined

The pthread_mutexattr_t object should be destroyed by calling
pthread_mutexattr_destroy(), otherwise it may cause a potential
memory leak due to the different implement of pthread_mutexattr_init()

Signed-off-by: chunxu.li <chunxuxiao@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/pcm/pcm.c