summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorneo.chae <neo.chae@lge.com>2016-11-01 00:02:38 +0900
committergitbuildkicker <android-build@google.com>2016-12-01 14:46:47 -0800
commit423a70c8b9ee012366c11f5d63d8088acd667fb4 (patch)
tree8f6faf3a816059fe76973a1361bd958c2ace0f76
parent296f6d595edf2ce86e72f5901464ad0f65b42958 (diff)
downloadbase-423a70c8b9ee012366c11f5d63d8088acd667fb4.tar.gz
Fix idmap leak in zygote process
Fix a idmap leak in AssetManager::addSystemOverlays. And, The fix could also prevent fd leak of idmap. Test: none Bug: 32691930 Signed-off-by: Hyangseok Chae <neo.chae@lge.com> (cherry picked from commit 6a742a38509693f8b39ee9a5ad2803fca12688bf) Change-Id: Idc4af77db2b0cb739bd6b009b6af0f9123be1aac (cherry picked from commit 0244ca8d10dfc27e14f481fe649b89f7638c48eb)
-rw-r--r--libs/androidfw/AssetManager.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/androidfw/AssetManager.cpp b/libs/androidfw/AssetManager.cpp
index 07044d0e9d61..7a103430feb5 100644
--- a/libs/androidfw/AssetManager.cpp
+++ b/libs/androidfw/AssetManager.cpp
@@ -804,6 +804,7 @@ void AssetManager::addSystemOverlays(const char* pathOverlaysList,
sharedRes->add(oass, oidmap, offset + 1, false);
const_cast<AssetManager*>(this)->mAssetPaths.add(oap);
const_cast<AssetManager*>(this)->mZipSet.addOverlay(targetPackagePath, oap);
+ delete oidmap;
}
}