diff options
author | Gloria Wang <gwang@google.com> | 2011-06-13 16:29:38 -0700 |
---|---|---|
committer | Gloria Wang <gwang@google.com> | 2011-06-13 16:29:38 -0700 |
commit | 50872c0b6563b75bb02e0de2fd578b40db8227db (patch) | |
tree | 265629254ff8dccd23348ba2c9ef18cbcf68b243 /drm | |
parent | afcedc9e6f17d8213d9bd8f6c36643dcc816d0ef (diff) | |
download | frameworks_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')
-rw-r--r-- | drm/libdrmframework/plugins/forward-lock/FwdLockEngine/src/FwdLockEngine.cpp | 5 |
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; |