summaryrefslogtreecommitdiffstats
path: root/include/drm/drm_framework_common.h
diff options
context:
space:
mode:
authorGloria Wang <gwang@google.com>2011-02-24 16:40:57 -0800
committerGloria Wang <gwang@google.com>2011-03-10 16:20:48 -0800
commitb5ce361d19e69fe156f7188c9ee0f4734b259874 (patch)
tree1536e63d3394cbbd5c2e8bc5cde6affb2b173850 /include/drm/drm_framework_common.h
parent609ce04d29780c430ff7e17511fc073a664c02d5 (diff)
downloadframeworks_av-b5ce361d19e69fe156f7188c9ee0f4734b259874.zip
frameworks_av-b5ce361d19e69fe156f7188c9ee0f4734b259874.tar.gz
frameworks_av-b5ce361d19e69fe156f7188c9ee0f4734b259874.tar.bz2
Fix for bug 3477330
This patch fixs a crash bug caused by using a NULL DecryptHandle pointer. Fix by using sp<DecryptHandle> instead. Change-Id: Icbd59858385e8256125a615a3c82656b25319d44
Diffstat (limited to 'include/drm/drm_framework_common.h')
-rw-r--r--include/drm/drm_framework_common.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/drm/drm_framework_common.h b/include/drm/drm_framework_common.h
index 1758cdd..3ad0330 100644
--- a/include/drm/drm_framework_common.h
+++ b/include/drm/drm_framework_common.h
@@ -19,6 +19,7 @@
#include <utils/Vector.h>
#include <utils/KeyedVector.h>
+#include <utils/RefBase.h>
#include <utils/String8.h>
#include <utils/Errors.h>
@@ -240,7 +241,7 @@ public:
/**
* Defines decryption handle
*/
-class DecryptHandle {
+class DecryptHandle : public RefBase {
public:
/**
* Decryption session Handle
@@ -285,10 +286,15 @@ public:
decryptId(INVALID_VALUE),
mimeType(""),
decryptApiType(INVALID_VALUE),
- status(INVALID_VALUE) {
+ status(INVALID_VALUE),
+ decryptInfo(NULL) {
}
+ ~DecryptHandle() {
+ delete decryptInfo; decryptInfo = NULL;
+ }
+
bool operator<(const DecryptHandle& handle) const {
return (decryptId < handle.decryptId);
}