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
commit409e5a07f044239aac2059c9ba3b3f6f48eeaba1 (patch)
tree15cee992c66e03cc53d88ef507c95a23c5107d70 /drm
parent50b0f02dea21f31ec1fbe45b86893aa9233483b8 (diff)
downloadframeworks_av-409e5a07f044239aac2059c9ba3b3f6f48eeaba1.zip
frameworks_av-409e5a07f044239aac2059c9ba3b3f6f48eeaba1.tar.gz
frameworks_av-409e5a07f044239aac2059c9ba3b3f6f48eeaba1.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;
}