From 096c8903a95beb1a303be4d79c8ed8e873fe5197 Mon Sep 17 00:00:00 2001
From: Peter Meerwald
Date: Mon, 18 Aug 2014 16:55:01 +0200
Subject: [PATCH] context: Handle client-side failure of
pa_srbchannel_new_from_template()
Signed-off-by: Peter Meerwald
Cc: David Henningsson
---
src/pulse/context.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/pulse/context.c b/src/pulse/context.c
index 387306cd4..d57240669 100644
--- a/src/pulse/context.c
+++ b/src/pulse/context.c
@@ -365,6 +365,10 @@ static void handle_srbchannel_memblock(pa_context *c, pa_memblock *memblock) {
c->srb_template.memblock = memblock;
pa_memblock_ref(memblock);
sr = pa_srbchannel_new_from_template(c->mainloop, &c->srb_template);
+ if (!sr) {
+ pa_context_fail(c, PA_ERR_PROTOCOL);
+ return;
+ }
/* Ack the enable command */
t = pa_tagstruct_new(NULL, 0);