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 | 9d18ec574f5d847a86a21594ac39394ef5b108fc (patch) | |
tree | 5c720b5e0835102eeff634fcf6d27f129751c3d1 /services/audioflinger | |
parent | 797ab6072402b12721dc226a9ebde3546e7640e9 (diff) | |
download | frameworks_av-9d18ec574f5d847a86a21594ac39394ef5b108fc.zip frameworks_av-9d18ec574f5d847a86a21594ac39394ef5b108fc.tar.gz frameworks_av-9d18ec574f5d847a86a21594ac39394ef5b108fc.tar.bz2 |
Fix issue 5373658: memory leak in AudioFlinger.
Unlink PowerManagerService binder interface death recipient
in ThreadBase destructor.
Change-Id: Iab06ae9a8a6737bb002b6416a157b0fb50c11ad5
Diffstat (limited to 'services/audioflinger')
-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() |