twrpinstall: Remove unnecessary CloseArchive() calls
The destructor MemoryPackage::~MemoryPackage() will automatically call CloseArchive(), so there is no need to repeat the operation to prevent Recovery from crashing. Change-Id: Ife5d5818bc603f8709e998b856a1e97bc365fc87
This commit is contained in:
@@ -66,7 +66,6 @@ bool read_metadata_from_package(ZipArchiveHandle zip, std::string* meta_data) {
|
||||
size);
|
||||
if (ret != 0) {
|
||||
printf("Failed to read metadata in update package.\n");
|
||||
CloseArchive(zip);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -213,7 +212,6 @@ abupdate_binary_command(const char* path, int retry_count __unused,
|
||||
binary_entry.uncompressed_length);
|
||||
if (extract_ret != 0) {
|
||||
printf("Can't extract %s\n", AB_OTA_PAYLOAD_PROPERTIES);
|
||||
CloseArchive(Zip);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user