Service handle leak in netwerk/base/src/nsAutodialWin.cpp

RESOLVED FIXED in mozilla12

Status

()

Core
Networking
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: bbondy, Assigned: bbondy)

Tracking

unspecified
mozilla12
x86_64
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

6 years ago
The calls to OpenSCManager and OpenServiceW in netwerk/base/src/nsAutodialWin.cpp return service handles.  Those handles should be closed but are never being closed.
(Assignee)

Comment 1

6 years ago
Created attachment 584988 [details] [diff] [review]
Leak fix. Patch v1.

Service handles were not being closed on any return path.

I'll land this after bug 481815 lands which defines nsAutoServiceHandle (an RAII class for ensuring service handles are closed).
Attachment #584988 - Flags: review?(bsmith)
(Assignee)

Comment 2

6 years ago
Created attachment 584990 [details] [diff] [review]
Leak fix. Patch v2.

Just fixed whitespace.
Attachment #584988 - Attachment is obsolete: true
Attachment #584988 - Flags: review?(bsmith)
Attachment #584990 - Flags: review?(bsmith)

Updated

6 years ago
Attachment #584990 - Flags: review?(bsmith) → review?(cbiesinger)
Attachment #584990 - Flags: review?(cbiesinger) → review+
(Assignee)

Comment 3

6 years ago
Pushed to mozilla-inbound:
http://hg.mozilla.org/integration/mozilla-inbound/rev/1cc0885caf02
Target Milestone: --- → mozilla12
https://hg.mozilla.org/mozilla-central/rev/1cc0885caf02
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.