diff options
author | Eric Laurent <elaurent@google.com> | 2013-05-13 12:47:53 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2013-05-13 12:47:53 -0700 |
commit | 704455a5a6cd22f03bb8984e0c7f46108eb1afb7 (patch) | |
tree | 05304d81745cbc088c743401276eb73269039a3f /media | |
parent | 0d24eb5e89963663150d38a320ec17244d39edf2 (diff) | |
download | frameworks_av-704455a5a6cd22f03bb8984e0c7f46108eb1afb7.zip frameworks_av-704455a5a6cd22f03bb8984e0c7f46108eb1afb7.tar.gz frameworks_av-704455a5a6cd22f03bb8984e0c7f46108eb1afb7.tar.bz2 |
Fix unreleased mutex in ToneGenerator stopTone()
Commit 09108ade introduced a regression by not releasing
the ToneGenerator mutex before exiting in case of error.
Bug: 8852855
Change-Id: I8ba2755b218842e2034ed8dbd54b18bf2a5fc571
Diffstat (limited to 'media')
-rw-r--r-- | media/libmedia/ToneGenerator.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/media/libmedia/ToneGenerator.cpp b/media/libmedia/ToneGenerator.cpp index f09ce75..f55b697 100644 --- a/media/libmedia/ToneGenerator.cpp +++ b/media/libmedia/ToneGenerator.cpp @@ -1012,6 +1012,7 @@ void ToneGenerator::stopTone() { if (lStatus == NO_ERROR) { // If the tone was restarted exit now before calling clearWaveGens(); if (mState != TONE_INIT) { + mLock.unlock(); return; } ALOGV("track stop complete, time %d", (unsigned int)(systemTime()/1000000)); |