Closed Bug 511497 Opened 15 years ago Closed 15 years ago

Possible file handle leak between nsJar::OpenFile and nsZipArchive::OpenArchive

Categories

(Core :: Networking: JAR, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 537165

People

(Reporter: alfredkayser, Assigned: alfredkayser)

Details

(Keywords: memory-leak)

nsJar::OpenFile opens a FD'tor to the jarfile, and then calls OpenArchive which then calls nsZipHandle::Init. If that last Init something fails (failing to mmap the file), FD will not be closed.
This is because nsZipHandle is the owner, but nsJar::OpenFile opens the file. 

Solution would be to move the open file stuff to nsZipHandle::Init so that it can do correct cleanup on failure.
The fix of 537165 will also fix this issue.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.