Signed-off-by: Lu Guanqun <guanqun.lu at intel.com> --- src/pulsecore/memblock.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/pulsecore/memblock.c b/src/pulsecore/memblock.c index e34a739..332fcb7 100644 --- a/src/pulsecore/memblock.c +++ b/src/pulsecore/memblock.c @@ -728,6 +728,8 @@ pa_mempool* pa_mempool_new(pa_bool_t shared, size_t size) { } if (pa_shm_create_rw(&p->memory, p->n_blocks * p->block_size, shared, 0700) < 0) { + pa_semaphore_free(p->semaphore); + pa_mutex_free(p->mutex); pa_xfree(p); return NULL; }