From 1a68b079d714b1de52775e1153359f2867340754 Mon Sep 17 00:00:00 2001 From: Piotr Jastrzebski Date: Fri, 8 Aug 2014 12:52:39 +0100 Subject: Remove memory leak. Call EndIteration in endIteration to free memory allocated for cookie in StartIteration. Change-Id: I3d58a461c2f3676565cfd7922dc6d8d5c35feae9 --- libs/androidfw/ZipFileRO.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libs/androidfw/ZipFileRO.cpp') diff --git a/libs/androidfw/ZipFileRO.cpp b/libs/androidfw/ZipFileRO.cpp index 1ab18ad056dc..a485d2bf59d2 100644 --- a/libs/androidfw/ZipFileRO.cpp +++ b/libs/androidfw/ZipFileRO.cpp @@ -53,6 +53,10 @@ public: _ZipEntryRO() : cookie(NULL) { } + ~_ZipEntryRO() { + EndIteration(cookie); + } + private: _ZipEntryRO(const _ZipEntryRO& other); _ZipEntryRO& operator=(const _ZipEntryRO& other); -- cgit v1.2.3-59-g8ed1b