[PATCH 4/4] context: Handle client-side failure of pa_srbchannel_new_from_template()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Peter Meerwald <p.meerwald@xxxxxxxxxxxxxxxxxx>

Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>
Cc: David Henningsson <david.henningsson at canonical.com>
---
 src/pulse/context.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/pulse/context.c b/src/pulse/context.c
index b8ebced..ff94543 100644
--- a/src/pulse/context.c
+++ b/src/pulse/context.c
@@ -360,6 +360,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);
-- 
1.7.9.5



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux