Closed Bug 29576 Opened 25 years ago Closed 25 years ago

[MLK] Leaking nsIAtoms

Categories

(Core :: Networking, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: beard, Assigned: gagan)

References

()

Details

The above URL shows a leaking call to NS_NewAtom(). The nsCOMPtr<nsIAtom> headerAtom should be assigned using getter_AddRefs. Here's a patch that fixes the leak: Index: mozilla/netwerk/protocol/http/src/nsHTTPResponse.cpp =================================================================== RCS file: /cvsroot/mozilla/netwerk/protocol/http/src/nsHTTPResponse.cpp,v retrieving revision 1.28 diff -r1.28 nsHTTPResponse.cpp 371c371 < headerAtom = NS_NewAtom(headerKey.GetBuffer()); --- > headerAtom = getter_AddRefs(NS_NewAtom(headerKey.GetBuffer()));
nice catch! fixed and will be sneaked in soon... :)
Status: NEW → ASSIGNED
Target Milestone: M15
This fix was reviewed by gagan and I checked it in after testing under Purify.
and hence sneaked in.. :)
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
verified
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.