OSDN Git Service

Fix memory leak in mapCentralDirectory.
authorJeff Brown <jeffbrown@google.com>
Wed, 20 Jul 2011 03:28:02 +0000 (20:28 -0700)
committerJeff Brown <jeffbrown@google.com>
Wed, 20 Jul 2011 03:39:56 +0000 (20:39 -0700)
commitd48cf5c57a850dd4b712efeeb35a09e3d5390f5e
treeda36350517e6df46e6002ac2698061fc804935bc
parentfe9052edaf6bebbccaac5a9fb607012778d0dd74
Fix memory leak in mapCentralDirectory.
Bug: 4984352

mapCentralDirectory was allocating a buffer of size 65557
that it passed to mapCentralDirectory0.  Then mapCentralDirectory0
was reallocating a new buffer which it failed to free.

This patch rearranges the code a little to ensure that only
buffer gets allocated and it gets freed.

Change-Id: I3b22e2b904f6e7584ab8a3af49c8f1350a40be87
libdex/ZipArchive.cpp