libmediaplayerservice: fix deadlock in dump()
-Calling dump function while the media clients (sessions) are created and destroyed will result in a deadlock. -MediaPlayerService::dump() takes Mutex while calling client::dump() and right after that the strong reference to client is cleared. If there are no references to client object at this moment (which is the case if multiple audio sessions are created and destroyed) then the client destructor gets called which tries to take the same Mutex resulting in a deadlock. -Take a strong reference to client objects and release them only after releasing the Mutex. CRs-Fixed:767761 Change-Id: I82c89771de352d2f0d914eb0a3b9fc7bfb6116b0
Loading
Please register or sign in to comment