summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2011-09-27 14:07:45 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-09-27 14:07:45 -0700
commitab7ed38d5fea82db64eb90bad9d4c646d61d15df (patch)
tree85da44c3e465acf308f5a2ace7a76c3b7a864bd8 /services
parentd33b3881f7647e721181c46f9166ee139cec7e38 (diff)
parent4a64a6e32c40c2708208864961844b242568ea17 (diff)
downloadframeworks_base-ab7ed38d5fea82db64eb90bad9d4c646d61d15df.zip
frameworks_base-ab7ed38d5fea82db64eb90bad9d4c646d61d15df.tar.gz
frameworks_base-ab7ed38d5fea82db64eb90bad9d4c646d61d15df.tar.bz2
Merge "Fix issue 5373658: memory leak in AudioFlinger."
Diffstat (limited to 'services')
-rw-r--r--services/audioflinger/AudioFlinger.cpp4
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()