diff options
author | Alistair Leslie-Hughes <leslie_alistair@hotmail.com> | 2022-08-31 21:26:55 +1000 |
---|---|---|
committer | Alistair Leslie-Hughes <leslie_alistair@hotmail.com> | 2022-10-19 08:06:46 +1100 |
commit | 3f9455411c90d2b2d1043c47ee24185fabb8e401 (patch) | |
tree | 34be9a8503e1b6e7503127bdf20c82151361d46b /src/pulsecore/native-common.c | |
parent | f2b748e851668acc67a8dcc190ff8ba822fa034e (diff) | |
download | pulseaudio-3f9455411c90d2b2d1043c47ee24185fabb8e401.tar.gz |
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 <leslie_alistair@hotmail.com>
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/747>
Diffstat (limited to 'src/pulsecore/native-common.c')
-rw-r--r-- | src/pulsecore/native-common.c | 3 |
1 files changed, 2 insertions, 1 deletions
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: |