diff options
author | Piotr Jastrzebski <haaawk@google.com> | 2014-08-08 12:52:39 +0100 |
---|---|---|
committer | Piotr Jastrzebski <haaawk@google.com> | 2014-08-11 08:20:35 +0100 |
commit | 1a68b079d714b1de52775e1153359f2867340754 (patch) | |
tree | 1f0ff93c4689f72fec09b5975b80c464df25f189 /libs/androidfw/ZipFileRO.cpp | |
parent | 94f3e47da5acc48b1003b64acdc539cdf6cbe30c (diff) |
Remove memory leak.
Call EndIteration in endIteration to free memory allocated for cookie in
StartIteration.
Change-Id: I3d58a461c2f3676565cfd7922dc6d8d5c35feae9
Diffstat (limited to 'libs/androidfw/ZipFileRO.cpp')
-rw-r--r-- | libs/androidfw/ZipFileRO.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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); |