Closed Bug 1385563 Opened 7 years ago Closed 7 years ago

Resource leak - File descriptor on the directory is not closed

Categories

(Toolkit :: Crash Reporting, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: Sylvestre, Assigned: Sylvestre)

References

(Blocks 1 open bug)

Details

(Keywords: coverity, Whiteboard: [CID 749517])

Attachments

(1 file)

in crashreporter_unix_common.cpp, dirfd is not closed
Assignee: nobody → sledru
Comment on attachment 8891625 [details]
Bug 1385563 - Resource leak - Close the file descriptor

https://reviewboard.mozilla.org/r/162726/#review172818

::: toolkit/crashreporter/client/crashreporter_unix_common.cpp:72
(Diff revision 1)
>      UIDeleteFile(path.c_str());
>  
>      dumpfiles.pop_back();
>    }
> +
> +  closedir(dirfd);

I would probably put this right after the while loop that uses it.
Attachment #8891625 - Flags: review?(ted) → review+
Pushed by sledru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/92df025b153e
Resource leak - Close the file descriptor r=ted
https://hg.mozilla.org/mozilla-central/rev/92df025b153e
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: