From fd193273271af5cc3e15c7b2c89dbd03704393ae Mon Sep 17 00:00:00 2001 From: Peter Meerwald Date: Tue, 12 Aug 2014 23:33:12 +0200 Subject: [PATCH] srbchannel: pa_srbchannel_new() may fail return from setup_srbchannel() when pa_srbchannel_new() fails pa_srbchannel_new() depends on HAVE_SYS_EVENTFD_H, e.g. Debian/kFreeBSD doesn't have it Signed-off-by: Peter Meerwald Acked-by: David Henningsson --- src/pulsecore/protocol-native.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c index 5f2c35d24..93db15758 100644 --- a/src/pulsecore/protocol-native.c +++ b/src/pulsecore/protocol-native.c @@ -2612,8 +2612,12 @@ static void setup_srbchannel(pa_native_connection *c) { return; } - pa_log_debug("Enabling srbchannel..."); srb = pa_srbchannel_new(c->protocol->core->mainloop, c->protocol->core->rw_mempool); + if (!srb) { + pa_log_debug("Failed to create srbchannel"); + return; + } + pa_log_debug("Enabling srbchannel..."); pa_srbchannel_export(srb, &srbt); /* Send enable command to client */