diff options
author | Songchun Fan <schfan@google.com> | 2019-07-08 09:00:34 -0700 |
---|---|---|
committer | Songchun Fan <schfan@google.com> | 2019-08-28 12:52:27 -0700 |
commit | 898b31640274863e14ba0c18a0f6f04706e17737 (patch) | |
tree | 4d5f5d5b68f2d71e7a232fa0b6bc954c955657e3 /libs/androidfw/ApkAssets.cpp | |
parent | 6bd1ab881e04c367670d39b613397779adfedebd (diff) |
[base] close zip archive when parsing fails
Test: manual
Change-Id: I54c054da6000df15dba81ad211eb1cf61e88c5a8
Diffstat (limited to 'libs/androidfw/ApkAssets.cpp')
-rw-r--r-- | libs/androidfw/ApkAssets.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/androidfw/ApkAssets.cpp b/libs/androidfw/ApkAssets.cpp index 9f4a6193b434..cf2ef3070385 100644 --- a/libs/androidfw/ApkAssets.cpp +++ b/libs/androidfw/ApkAssets.cpp @@ -116,6 +116,7 @@ std::unique_ptr<const ApkAssets> ApkAssets::LoadImpl( if (result != 0) { LOG(ERROR) << "Failed to open APK '" << path << "' " << ::ErrorCodeString(result); + ::CloseArchive(unmanaged_handle); return {}; } |