summaryrefslogtreecommitdiffstats
path: root/drm/libdrmframework
diff options
context:
space:
mode:
authorGloria Wang <gwang@google.com>2011-06-13 16:29:38 -0700
committerGloria Wang <gwang@google.com>2011-06-13 16:29:38 -0700
commit50872c0b6563b75bb02e0de2fd578b40db8227db (patch)
tree265629254ff8dccd23348ba2c9ef18cbcf68b243 /drm/libdrmframework
parentafcedc9e6f17d8213d9bd8f6c36643dcc816d0ef (diff)
downloadframeworks_av-50872c0b6563b75bb02e0de2fd578b40db8227db.zip
frameworks_av-50872c0b6563b75bb02e0de2fd578b40db8227db.tar.gz
frameworks_av-50872c0b6563b75bb02e0de2fd578b40db8227db.tar.bz2
Duplicated fileDesc is not closed when input file is not forward-lock content.
Fix for bug 4606053. Change-Id: I1b45457d8cdc75d268631911f46ce6ec931b1770
Diffstat (limited to 'drm/libdrmframework')
-rw-r--r--drm/libdrmframework/plugins/forward-lock/FwdLockEngine/src/FwdLockEngine.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/drm/libdrmframework/plugins/forward-lock/FwdLockEngine/src/FwdLockEngine.cpp b/drm/libdrmframework/plugins/forward-lock/FwdLockEngine/src/FwdLockEngine.cpp
index d430f72..3cbd8f1 100644
--- a/drm/libdrmframework/plugins/forward-lock/FwdLockEngine/src/FwdLockEngine.cpp
+++ b/drm/libdrmframework/plugins/forward-lock/FwdLockEngine/src/FwdLockEngine.cpp
@@ -455,11 +455,14 @@ status_t FwdLockEngine::onOpenDecryptSession(int uniqueId,
} else {
LOGD("FwdLockEngine::onOpenDecryptSession Integrity Check failed for the fd");
FwdLockFile_detach(fileDesc);
- ::close(fileDesc);
delete decodeSession;
}
}
+ if (DRM_NO_ERROR != result && -1 < fileDesc) {
+ ::close(fileDesc);
+ }
+
LOGD("FwdLockEngine::onOpenDecryptSession Exit. result = %d", result);
return result;