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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux