Closed
Bug 104183
Opened 24 years ago
Closed 24 years ago
Possible leak in nsAboutProtocol
Categories
(Core :: Networking, defect)
Tracking
()
VERIFIED
INVALID
People
(Reporter: hwaara, Assigned: neeti)
Details
I think I found a leak, and made a patch to make this code us nsCOMPtr:
? diff
Index: about/src/nsAboutProtocolHandler.cpp
===================================================================
RCS file: /cvsroot/mozilla/netwerk/protocol/about/src/nsAboutProtocolHandler.cpp,v
retrieving revision 1.28
diff -u -r1.28 nsAboutProtocolHandler.cpp
--- nsAboutProtocolHandler.cpp 2001/09/28 20:09:16 1.28
+++ nsAboutProtocolHandler.cpp 2001/10/10 22:38:00
@@ -122,16 +122,13 @@
// no concept of a relative about url
NS_ASSERTION(!aBaseURI, "base url passed into about protocol handler");
- nsIURI* url;
+ nsCOMPtr<nsIURI> url;
rv = nsComponentManager::CreateInstance(kSimpleURICID, nsnull,
NS_GET_IID(nsIURI),
- (void**)&url);
+ getter_AddRefs(url));
if (NS_FAILED(rv)) return rv;
- rv = url->SetSpec((char*)aSpec);
- if (NS_FAILED(rv)) {
- NS_RELEASE(url);
- return rv;
- }
+ rv = url->SetSpec((const char*)aSpec);
+ if (NS_FAILED(rv)) return rv;
*result = url;
return rv;
dougt had some comments. darin, dougt - can you review or attach a modified patch?
Comment 1•24 years ago
|
||
where is the leak in the existing code?
Reporter | ||
Comment 2•24 years ago
|
||
darin and dougt explained why this isn't a leak in an email.
Marking as invalid. Sorry for the noise.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•