diff options
author | Chirayu Desai <cdesai@cyanogenmod.org> | 2013-03-07 08:11:39 -0800 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2013-03-07 08:11:39 -0800 |
commit | 7cc1b5631a3dca0beb340ddee06753b09840ea45 (patch) | |
tree | 43971190c2cb62b4c2cc4664b6299e58cf63f88a | |
parent | f4579ef086a9503867b27f680e0abdfd38026c29 (diff) | |
parent | c3550dbf40f247519aa8bbd2eed1561d1b88e65f (diff) | |
download | bootable_recovery-7cc1b5631a3dca0beb340ddee06753b09840ea45.zip bootable_recovery-7cc1b5631a3dca0beb340ddee06753b09840ea45.tar.gz bootable_recovery-7cc1b5631a3dca0beb340ddee06753b09840ea45.tar.bz2 |
Merge "Pass the correct pointer to munmap on failure." into cm-10.1
-rw-r--r-- | minzip/SysUtil.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/minzip/SysUtil.c b/minzip/SysUtil.c index 49a2522..31c76d6 100644 --- a/minzip/SysUtil.c +++ b/minzip/SysUtil.c @@ -95,16 +95,16 @@ int sysLoadFileInShmem(int fd, MemMapping* pMap) if (memPtr == NULL) return -1; - actual = read(fd, memPtr, length); + pMap->baseAddr = pMap->addr = memPtr; + pMap->baseLength = pMap->length = length; + + actual = TEMP_FAILURE_RETRY(read(fd, memPtr, length)); if (actual != length) { LOGE("only read %d of %d bytes\n", (int) actual, (int) length); sysReleaseShmem(pMap); return -1; } - pMap->baseAddr = pMap->addr = memPtr; - pMap->baseLength = pMap->length = length; - return 0; } |