summaryrefslogtreecommitdiffstats
path: root/drm
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2011-04-24 12:38:35 -0700
committerJames Dong <jdong@google.com>2011-04-24 12:40:16 -0700
commit3f0341cbbdeee248e71814f7071233c823b44f74 (patch)
tree00df7db5e10b08f378d3dd2af1c045ff683941e0 /drm
parenta8965da9886496952c6f97a402c4682ee1e37c81 (diff)
downloadframeworks_base-3f0341cbbdeee248e71814f7071233c823b44f74.zip
frameworks_base-3f0341cbbdeee248e71814f7071233c823b44f74.tar.gz
frameworks_base-3f0341cbbdeee248e71814f7071233c823b44f74.tar.bz2
Fix memory leak from retrieval of getSupportedDrmInfo.
Change-Id: Ic2192a9791c0a3c5e5357b4367a2d8bfb15af20c
Diffstat (limited to 'drm')
-rw-r--r--drm/drmserver/DrmManager.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/drm/drmserver/DrmManager.cpp b/drm/drmserver/DrmManager.cpp
index 2fee59c..1809619 100644
--- a/drm/drmserver/DrmManager.cpp
+++ b/drm/drmserver/DrmManager.cpp
@@ -101,6 +101,7 @@ status_t DrmManager::loadPlugIns(const String8& plugInDirPath) {
DrmSupportInfo* info = mPlugInManager.getPlugIn(plugInPath).getSupportInfo(0);
if (NULL != info) {
mSupportInfoToPlugInIdMap.add(*info, plugInPath);
+ delete info;
}
}
}
@@ -178,6 +179,7 @@ status_t DrmManager::installDrmEngine(int uniqueId, const String8& absolutePath)
DrmSupportInfo* info = rDrmEngine.getSupportInfo(0);
mSupportInfoToPlugInIdMap.add(*info, absolutePath);
+ delete info;
return DRM_NO_ERROR;
}