summaryrefslogtreecommitdiff
path: root/libs/androidfw/Asset.cpp
diff options
context:
space:
mode:
author Narayan Kamath <narayan@google.com> 2015-02-24 12:50:55 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-02-24 12:50:57 +0000
commit72dc62ead214bdec5c46d42f4e859b139dba0a00 (patch)
tree2a93b6efb0bdd3fd46406466f6344623bd94f961 /libs/androidfw/Asset.cpp
parent6e208cddad3315c4e38accdb801908b2b9b5cbbd (diff)
parent688ff4cf0f93d1a886437884f23874e5595d59a3 (diff)
Merge "Track removal of refcounts from FileMap."
Diffstat (limited to 'libs/androidfw/Asset.cpp')
-rw-r--r--libs/androidfw/Asset.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/androidfw/Asset.cpp b/libs/androidfw/Asset.cpp
index 4b3382e4fc5d..782806e55429 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;
}