summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorneo.chae <neo.chae@lge.com>2016-11-01 00:02:38 +0900
committerandroid-merger <android-merger@vpba3.mtv.corp.google.com>2017-01-03 16:17:57 -0800
commitc4b8272fe4f663bb9f89ef222314b15f4b12b267 (patch)
tree090bfbaa9274a674ebbb2d95ec46002b3e1d9b55
parent7f0c2c8a9cf9bda249cb79841a7b0eefd0e657b4 (diff)
downloadbase-c4b8272fe4f663bb9f89ef222314b15f4b12b267.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;
}
}