From 3f9455411c90d2b2d1043c47ee24185fabb8e401 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Wed, 31 Aug 2022 21:26:55 +1000 Subject: Propagate return value from pa_pstream_attach_memfd_shmid Using wine, The mmap call in shm_attach sometimes fails with ENOMEM which isn't propagated up the call stack. Signed-off-by: Alistair Leslie-Hughes Part-of: --- src/pulsecore/native-common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pulsecore/native-common.c b/src/pulsecore/native-common.c index 282a4ed3b..e59807385 100644 --- a/src/pulsecore/native-common.c +++ b/src/pulsecore/native-common.c @@ -64,7 +64,8 @@ int pa_common_command_register_memfd_shmid(pa_pstream *p, pa_pdispatch *pd, uint if (version < 31 || pa_tagstruct_getu32(t, &shm_id) < 0 || !pa_tagstruct_eof(t)) goto finish; - pa_pstream_attach_memfd_shmid(p, shm_id, ancil->fds[0]); + if (pa_pstream_attach_memfd_shmid(p, shm_id, ancil->fds[0])) + goto finish; ret = 0; finish: -- cgit v1.2.1