summaryrefslogtreecommitdiffstats
path: root/drm
diff options
context:
space:
mode:
authorGloria Wang <gwang@google.com>2011-06-14 10:05:55 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-06-14 10:05:55 -0700
commit6771263604cf8e464b5cd1278823b0898af3a2a9 (patch)
tree27f3bfe550a0b755cd0e21f0af0700a1bd358e70 /drm
parent3f1545d22a71f960c9598a24e7e48ec16dd16267 (diff)
parent50872c0b6563b75bb02e0de2fd578b40db8227db (diff)
downloadframeworks_av-6771263604cf8e464b5cd1278823b0898af3a2a9.zip
frameworks_av-6771263604cf8e464b5cd1278823b0898af3a2a9.tar.gz
frameworks_av-6771263604cf8e464b5cd1278823b0898af3a2a9.tar.bz2
Merge "Duplicated fileDesc is not closed when input file is not forward-lock content. Fix for bug 4606053."
Diffstat (limited to 'drm')
-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;