diff options
author | Eric Laurent <elaurent@google.com> | 2011-09-27 12:07:15 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2011-09-27 12:07:15 -0700 |
commit | 4a64a6e32c40c2708208864961844b242568ea17 (patch) | |
tree | 17bfcd23ed7b98897887fb0b7ca84a64068fd806 | |
parent | 71bfec448847d8585c8a789596525dc729350877 (diff) | |
download | frameworks_base-4a64a6e32c40c2708208864961844b242568ea17.zip frameworks_base-4a64a6e32c40c2708208864961844b242568ea17.tar.gz frameworks_base-4a64a6e32c40c2708208864961844b242568ea17.tar.bz2 |
Fix issue 5373658: memory leak in AudioFlinger.
Unlink PowerManagerService binder interface death recipient
in ThreadBase destructor.
Change-Id: Iab06ae9a8a6737bb002b6416a157b0fb50c11ad5
-rw-r--r-- | services/audioflinger/AudioFlinger.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index 88a05b2..01f5a6f 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp @@ -985,6 +985,10 @@ AudioFlinger::ThreadBase::~ThreadBase() mNewParameters.clear(); // do not lock the mutex in destructor releaseWakeLock_l(); + if (mPowerManager != 0) { + sp<IBinder> binder = mPowerManager->asBinder(); + binder->unlinkToDeath(mDeathRecipient); + } } void AudioFlinger::ThreadBase::exit() |