[pulseaudio-discuss] [PATCH] utils: Avoid possible deadlock. Unlocked i->mainloop before returning from default case.

Deepak Srivastava srivastava.d at samsung.com
Wed Jul 1 22:15:09 PDT 2015


BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=91184

Signed-off-by: Deepak Srivastava <srivastava.d at samsung.com>
---
 src/utils/padsp.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/utils/padsp.c b/src/utils/padsp.c
index b696b39..a054016 100644
--- a/src/utils/padsp.c
+++ b/src/utils/padsp.c
@@ -1201,6 +1201,10 @@ static int dsp_open(int flags, int *_errno) {
         i->io_flags = PA_IO_EVENT_INPUT | PA_IO_EVENT_OUTPUT;
         break;
     default:
+        pa_threaded_mainloop_unlock(i->mainloop);
+        if (i)
+            fd_info_unref(i);
+        *_errno = EIO;
         return -1;
     }
 
-- 
1.7.9.5



More information about the pulseaudio-discuss mailing list