summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorneo.chae <neo.chae@lge.com>2016-11-01 00:02:38 +0900
committerChristopher R. Palmer <crpalmer@gmail.com>2017-02-03 20:27:33 -0500
commitbbec1eb03e8ea93910c369304c2335c5f736f967 (patch)
tree0e547df4d02254ae43dc363a3093454061e22079
parent5a1319ce573a9273404e2ded4bce1459008dd048 (diff)
downloadframeworks_base-bbec1eb03e8ea93910c369304c2335c5f736f967.zip
frameworks_base-bbec1eb03e8ea93910c369304c2335c5f736f967.tar.gz
frameworks_base-bbec1eb03e8ea93910c369304c2335c5f736f967.tar.bz2
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 1add6c3..e6e4563 100644
--- a/libs/androidfw/AssetManager.cpp
+++ b/libs/androidfw/AssetManager.cpp
@@ -1006,6 +1006,7 @@ void AssetManager::addSystemOverlays(const char* pathOverlaysList,
sharedRes->add(oass, oidmap, offset + 1, false, oap.pkgIdOverride);
const_cast<AssetManager*>(this)->mAssetPaths.add(oap);
const_cast<AssetManager*>(this)->mZipSet.addOverlay(targetPackagePath, oap);
+ delete oidmap;
}
}
fclose(fin);