summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2014-03-05 19:16:28 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-03-05 19:16:28 +0000
commitd8ed565f1541ccda63254f236064fa22be9ecbf9 (patch)
treefc4f67fe8ecbe89f4e9ca161e16ef2643a10b7f1
parent933f0b88e4232f58f171b8217d7871f97a927c57 (diff)
parentf27f9e10f50a015ec2d76a2f3579a5d11932965e (diff)
downloadsystem_core-d8ed565f1541ccda63254f236064fa22be9ecbf9.zip
system_core-d8ed565f1541ccda63254f236064fa22be9ecbf9.tar.gz
system_core-d8ed565f1541ccda63254f236064fa22be9ecbf9.tar.bz2
am f27f9e10: am 51ebffd8: Merge "Add free to CloseArchive."
* commit 'f27f9e10f50a015ec2d76a2f3579a5d11932965e': Add free to CloseArchive.
-rw-r--r--libziparchive/zip_archive.cc8
1 files changed, 1 insertions, 7 deletions
diff --git a/libziparchive/zip_archive.cc b/libziparchive/zip_archive.cc
index 8ef0962..01f9249 100644
--- a/libziparchive/zip_archive.cc
+++ b/libziparchive/zip_archive.cc
@@ -591,13 +591,7 @@ void CloseArchive(ZipArchiveHandle handle) {
archive->directory_map->release();
}
free(archive->hash_table);
-
- /* ensure nobody tries to use the ZipArchive after it's closed */
- archive->directory_offset = -1;
- archive->fd = -1;
- archive->num_entries = -1;
- archive->hash_table_size = -1;
- archive->hash_table = NULL;
+ free(archive);
}
static int32_t UpdateEntryFromDataDescriptor(int fd,