Add free to CloseArchive.
Currently CloseArchive doesn't call free and call sites don't appear to either. I could not find any call sites which manually freed the archive by deleting the handle. This fixes several memory leaks. Change-Id: I21f187dde60fd87e6e54bde06de9e76fd0791104
This commit is contained in:
parent
2a16a5847a
commit
5f98b12640
1 changed files with 1 additions and 7 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue