Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a198f02a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "idmap2: ZipFile::Open: fix potential memory leak"

parents 4d310631 0955d208
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ std::unique_ptr<const ZipFile> ZipFile::Open(const std::string& path) {
  ::ZipArchiveHandle handle;
  int32_t status = ::OpenArchive(path.c_str(), &handle);
  if (status != 0) {
    ::CloseArchive(handle);
    return nullptr;
  }
  return std::unique_ptr<ZipFile>(new ZipFile(handle));