Bug 737463 - nsJARInputStream leaks if it is closed before the stream is inflated. r=mwu

This commit is contained in:
Chris Coulson 2012-04-11 17:55:22 -04:00
parent 1ecb813261
commit d53453d1f3

View File

@ -276,6 +276,9 @@ nsJARInputStream::IsNonBlocking(bool *aNonBlocking)
NS_IMETHODIMP NS_IMETHODIMP
nsJARInputStream::Close() nsJARInputStream::Close()
{ {
if (mMode == MODE_INFLATE) {
inflateEnd(&mZs);
}
mMode = MODE_CLOSED; mMode = MODE_CLOSED;
mFd = nsnull; mFd = nsnull;
return NS_OK; return NS_OK;