From 7bafb97d3facf974fa4cf26bf182bf7d5f039439 Mon Sep 17 00:00:00 2001 From: Gloria Wang Date: Tue, 21 Jun 2011 11:07:59 -0700 Subject: Fix a memory leak in the Forward Lock plugin. For bug 4770217. Change-Id: I14f4d4ead524c661e68a20738e7a50e4d8fd92ea --- .../forward-lock/FwdLockEngine/src/FwdLockEngine.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'drm') 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; } -- cgit v1.1