Loading cmds/bootanimation/AudioPlayer.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -305,7 +305,7 @@ bool AudioPlayer::threadLoop() exit: if (pcm) pcm_close(pcm); mCurrentFile->release(); delete mCurrentFile; mCurrentFile = NULL; return false; } Loading cmds/bootanimation/BootAnimation.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -179,7 +179,7 @@ status_t BootAnimation::initTexture(const Animation::Frame& frame) // FileMap memory is never released until application exit. // Release it now as the texture is already loaded and the memory used for // the packed resource can be released. frame.map->release(); delete frame.map; // ensure we can call getPixels(). No need to call unlock, since the // bitmap will go out of scope when we return from this method. Loading Loading @@ -446,7 +446,7 @@ bool BootAnimation::readFile(const char* name, String8& outString) } outString.setTo((char const*)entryMap->getDataPtr(), entryMap->getDataLength()); entryMap->release(); delete entryMap; return true; } Loading cmds/idmap/scan.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -147,20 +147,20 @@ namespace { char *buf = new char[uncompLen]; if (NULL == buf) { ALOGW("%s: failed to allocate %zd byte\n", __FUNCTION__, uncompLen); dataMap->release(); delete dataMap; return -1; } StreamingZipInflater inflater(dataMap, uncompLen); if (inflater.read(buf, uncompLen) < 0) { ALOGW("%s: failed to inflate %zd byte\n", __FUNCTION__, uncompLen); delete[] buf; dataMap->release(); delete dataMap; return -1; } int priority = parse_manifest(buf, uncompLen, target_package_name); delete[] buf; dataMap->release(); delete dataMap; return priority; } } Loading libs/androidfw/Asset.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -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) { Loading Loading @@ -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; } Loading Loading @@ -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; } Loading libs/androidfw/ZipFileRO.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -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; } Loading Loading
cmds/bootanimation/AudioPlayer.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -305,7 +305,7 @@ bool AudioPlayer::threadLoop() exit: if (pcm) pcm_close(pcm); mCurrentFile->release(); delete mCurrentFile; mCurrentFile = NULL; return false; } Loading
cmds/bootanimation/BootAnimation.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -179,7 +179,7 @@ status_t BootAnimation::initTexture(const Animation::Frame& frame) // FileMap memory is never released until application exit. // Release it now as the texture is already loaded and the memory used for // the packed resource can be released. frame.map->release(); delete frame.map; // ensure we can call getPixels(). No need to call unlock, since the // bitmap will go out of scope when we return from this method. Loading Loading @@ -446,7 +446,7 @@ bool BootAnimation::readFile(const char* name, String8& outString) } outString.setTo((char const*)entryMap->getDataPtr(), entryMap->getDataLength()); entryMap->release(); delete entryMap; return true; } Loading
cmds/idmap/scan.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -147,20 +147,20 @@ namespace { char *buf = new char[uncompLen]; if (NULL == buf) { ALOGW("%s: failed to allocate %zd byte\n", __FUNCTION__, uncompLen); dataMap->release(); delete dataMap; return -1; } StreamingZipInflater inflater(dataMap, uncompLen); if (inflater.read(buf, uncompLen) < 0) { ALOGW("%s: failed to inflate %zd byte\n", __FUNCTION__, uncompLen); delete[] buf; dataMap->release(); delete dataMap; return -1; } int priority = parse_manifest(buf, uncompLen, target_package_name); delete[] buf; dataMap->release(); delete dataMap; return priority; } } Loading
libs/androidfw/Asset.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -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) { Loading Loading @@ -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; } Loading Loading @@ -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; } Loading
libs/androidfw/ZipFileRO.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -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; } Loading