diff options
author | Narayan Kamath <narayan@google.com> | 2015-02-24 13:09:55 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-02-24 13:09:55 +0000 |
commit | 23eeb2b8aefce56a0a35a6fc460bd8718157e902 (patch) | |
tree | a0a612939f95de6ffd1bb419fe155aba977bdf73 /libs/androidfw | |
parent | 419389c52a2c81cbb0b4615d6b0b1c1253c3469c (diff) | |
parent | 287c53f4a8bade1cb6c2dd2fe858da9c303e3e3d (diff) | |
download | frameworks_base-23eeb2b8aefce56a0a35a6fc460bd8718157e902.zip frameworks_base-23eeb2b8aefce56a0a35a6fc460bd8718157e902.tar.gz frameworks_base-23eeb2b8aefce56a0a35a6fc460bd8718157e902.tar.bz2 |
am 287c53f4: am 76507a64: am 72dc62ea: Merge "Track removal of refcounts from FileMap."
* commit '287c53f4a8bade1cb6c2dd2fe858da9c303e3e3d':
Track removal of refcounts from FileMap.
Diffstat (limited to 'libs/androidfw')
-rw-r--r-- | libs/androidfw/Asset.cpp | 6 | ||||
-rw-r--r-- | libs/androidfw/ZipFileRO.cpp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/libs/androidfw/Asset.cpp b/libs/androidfw/Asset.cpp index 4b3382e..782806e 100644 --- a/libs/androidfw/Asset.cpp +++ b/libs/androidfw/Asset.cpp @@ -532,7 +532,7 @@ off64_t _FileAsset::seek(off64_t offset, int whence) void _FileAsset::close(void) { if (mMap != NULL) { - mMap->release(); + delete mMap; mMap = NULL; } if (mBuf != NULL) { @@ -612,7 +612,7 @@ const void* _FileAsset::getBuffer(bool wordAligned) map = new FileMap; if (!map->create(NULL, fileno(mFp), mStart, mLength, true)) { - map->release(); + delete map; return NULL; } @@ -827,7 +827,7 @@ off64_t _CompressedAsset::seek(off64_t offset, int whence) void _CompressedAsset::close(void) { if (mMap != NULL) { - mMap->release(); + delete mMap; mMap = NULL; } diff --git a/libs/androidfw/ZipFileRO.cpp b/libs/androidfw/ZipFileRO.cpp index ef0d072..af3d9b3 100644 --- a/libs/androidfw/ZipFileRO.cpp +++ b/libs/androidfw/ZipFileRO.cpp @@ -200,7 +200,7 @@ FileMap* ZipFileRO::createEntryFileMap(ZipEntryRO entry) const FileMap* newMap = new FileMap(); if (!newMap->create(mFileName, fd, ze.offset, actualLen, true)) { - newMap->release(); + delete newMap; return NULL; } |