Release zip inflater when finished

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210513776
This commit is contained in:
eguven 2018-08-28 03:01:02 -07:00 committed by Oliver Woodman
parent d0161ad18b
commit 23817eecfd

View file

@ -121,8 +121,13 @@ public final class ProjectionDecoder {
int encoding = input.readInt();
if (encoding == TYPE_DFL8) {
ParsableByteArray output = new ParsableByteArray();
if (!Util.inflate(input, output, new Inflater(true))) {
return null;
Inflater inflater = new Inflater(true);
try {
if (!Util.inflate(input, output, inflater)) {
return null;
}
} finally {
inflater.end();
}
input = output;
} else if (encoding != TYPE_RAW) {