#fixed code
                              private InputStream getZipEntryStream(String file, String entryName) {
    try (ZipFile zip = new ZipFile(new File(file))) {
      ZipEntry entry = zip.getEntry(entryName);

      if (entry == null) return null;

      return zip.getInputStream(entry);
    }
    catch (IOException e) {
      return null;
    }
  }
#vulnerable code 
                              private InputStream getZipEntryStream(String file, String entryName) {
    try {
      ZipFile zip = new ZipFile(new File(file));
      ZipEntry entry = zip.getEntry(entryName);

      if (entry == null) return null;

      return zip.getInputStream(entry);
    }
    catch (IOException e) {
      return null;
    }
  } 
                            #location 6 
                            #vulnerability type RESOURCE_LEAK