Remove memory leak.
Call EndIteration in endIteration to free memory allocated for cookie in
StartIteration.
Change-Id: I3d58a461c2f3676565cfd7922dc6d8d5c35feae9
diff --git a/libs/androidfw/ZipFileRO.cpp b/libs/androidfw/ZipFileRO.cpp
index 1ab18ad..a485d2b 100644
--- a/libs/androidfw/ZipFileRO.cpp
+++ b/libs/androidfw/ZipFileRO.cpp
@@ -53,6 +53,10 @@
_ZipEntryRO() : cookie(NULL) {
}
+ ~_ZipEntryRO() {
+ EndIteration(cookie);
+ }
+
private:
_ZipEntryRO(const _ZipEntryRO& other);
_ZipEntryRO& operator=(const _ZipEntryRO& other);