summaryrefslogtreecommitdiff
path: root/src/pulsecore/srbchannel.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulsecore/srbchannel.c')
-rw-r--r--src/pulsecore/srbchannel.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pulsecore/srbchannel.c b/src/pulsecore/srbchannel.c
index a0f916e..8872a89 100644
--- a/src/pulsecore/srbchannel.c
+++ b/src/pulsecore/srbchannel.c
@@ -231,6 +231,9 @@ pa_srbchannel* pa_srbchannel_new(pa_mainloop_api *m, pa_mempool *p) {
pa_srbchannel* sr = pa_xmalloc0(sizeof(pa_srbchannel));
sr->mainloop = m;
sr->memblock = pa_memblock_new_pool(p, -1);
+ if (!sr->memblock)
+ goto fail;
+
srh = pa_memblock_acquire(sr->memblock);
pa_zero(*srh);