Skip to content

Commit ab7ed38

Browse files
Eric LaurentAndroid (Google) Code Review
authored andcommitted
Merge "Fix issue 5373658: memory leak in AudioFlinger."
2 parents d33b388 + 4a64a6e commit ab7ed38

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

services/audioflinger/AudioFlinger.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -985,6 +985,10 @@ AudioFlinger::ThreadBase::~ThreadBase()
985985
mNewParameters.clear();
986986
// do not lock the mutex in destructor
987987
releaseWakeLock_l();
988+
if (mPowerManager != 0) {
989+
sp<IBinder> binder = mPowerManager->asBinder();
990+
binder->unlinkToDeath(mDeathRecipient);
991+
}
988992
}
989993

990994
void AudioFlinger::ThreadBase::exit()

0 commit comments

Comments
 (0)