]> code.delx.au - pulseaudio/blobdiff - src/pulse/context.c
add new pa_pipe_close() API to close two fds at the same time
[pulseaudio] / src / pulse / context.c
index 1ed250f9c79c0b635065a9e1490aa286689343e3..a39646d3544210c0290e2a0b7a0d502b041d4928 100644 (file)
@@ -585,10 +585,7 @@ static int context_connect_spawn(pa_context *c) {
     return 0;
 
 fail:
-    if (fds[0] != -1)
-        pa_assert_se(pa_close(fds[0]) == 0);
-    if (fds[1] != -1)
-        pa_assert_se(pa_close(fds[1]) == 0);
+    pa_close_pipe(fds);
 
     unlock_autospawn_lock_file(c);