summaryrefslogtreecommitdiffstats
path: root/drm
diff options
context:
space:
mode:
authorGloria Wang <gwang@google.com>2011-06-21 11:07:59 -0700
committerGloria Wang <gwang@google.com>2011-06-21 11:07:59 -0700
commit7bafb97d3facf974fa4cf26bf182bf7d5f039439 (patch)
treed419dc79d15e2a1ae2a4622602cd21670c473b1d /drm
parent13774d2e38e73ef4d0f6d0db3501ba032fa6da5a (diff)
downloadframeworks_base-7bafb97d3facf974fa4cf26bf182bf7d5f039439.zip
frameworks_base-7bafb97d3facf974fa4cf26bf182bf7d5f039439.tar.gz
frameworks_base-7bafb97d3facf974fa4cf26bf182bf7d5f039439.tar.bz2
Fix a memory leak in the Forward Lock plugin.
For bug 4770217. Change-Id: I14f4d4ead524c661e68a20738e7a50e4d8fd92ea
Diffstat (limited to 'drm')
-rw-r--r--drm/libdrmframework/plugins/forward-lock/FwdLockEngine/src/FwdLockEngine.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/drm/libdrmframework/plugins/forward-lock/FwdLockEngine/src/FwdLockEngine.cpp b/drm/libdrmframework/plugins/forward-lock/FwdLockEngine/src/FwdLockEngine.cpp
index 07b3b47..31c3c14 100644
--- a/drm/libdrmframework/plugins/forward-lock/FwdLockEngine/src/FwdLockEngine.cpp
+++ b/drm/libdrmframework/plugins/forward-lock/FwdLockEngine/src/FwdLockEngine.cpp
@@ -512,6 +512,19 @@ status_t FwdLockEngine::onCloseDecryptSession(int uniqueId,
}
}
+ if (NULL != decryptHandle) {
+ if (NULL != decryptHandle->decryptInfo) {
+ delete decryptHandle->decryptInfo;
+ decryptHandle->decryptInfo = NULL;
+ }
+
+ decryptHandle->copyControlVector.clear();
+ decryptHandle->extendedData.clear();
+
+ delete decryptHandle;
+ decryptHandle = NULL;
+ }
+
LOGV("FwdLockEngine::onCloseDecryptSession Exit");
return result;
}