Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0244ca8d authored by neo.chae's avatar neo.chae Committed by Narayan Kamath
Browse files

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: default avatarHyangseok Chae <neo.chae@lge.com>

(cherry picked from commit 6a742a38)

Change-Id: Idc4af77db2b0cb739bd6b009b6af0f9123be1aac
parent 21c4e6d5
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -798,6 +798,7 @@ void AssetManager::addSystemOverlays(const char* pathOverlaysList,
            sharedRes->add(oass, oidmap, offset + 1, false);
            sharedRes->add(oass, oidmap, offset + 1, false);
            const_cast<AssetManager*>(this)->mAssetPaths.add(oap);
            const_cast<AssetManager*>(this)->mAssetPaths.add(oap);
            const_cast<AssetManager*>(this)->mZipSet.addOverlay(targetPackagePath, oap);
            const_cast<AssetManager*>(this)->mZipSet.addOverlay(targetPackagePath, oap);
            delete oidmap;
        }
        }
    }
    }
    fclose(fin);
    fclose(fin);