Closed
Bug 20170
Opened 25 years ago
Closed 25 years ago
[MLK] Leaking UNICODE String in nsWebShell::AddChild(nsIWebShell* aChild)
Categories
(Core Graveyard :: Embedding: APIs, defect, P2)
Core Graveyard
Embedding: APIs
Tracking
(Not tracked)
VERIFIED
FIXED
M12
People
(Reporter: beard, Assigned: buster)
References
()
Details
nsWebShell::AddChild(nsIWebShell* aChild) leaks potentially 2 UNICODE buffers.
The above URL points to the line of code that allocates the strings, and no code
is present to deallocate them. Here's a quick patch to fix the leaks:
Index: mozilla/webshell/src/nsWebShell.cpp
===================================================================
RCS file: /cvsroot/mozilla/webshell/src/nsWebShell.cpp,v
retrieving revision 1.318
diff -r1.318 nsWebShell.cpp
1428,1429c1428
< PRUnichar *defaultCharset=nsnull;
< PRUnichar *forceCharset=nsnull;
---
> nsXPIDLString defaultCharset, forceCharset;
1437,1438c1436,1437
< NS_ENSURE_SUCCESS(muDV->GetDefaultCharacterSet (&defaultCharset),
NS_ERROR_FAILURE);
< NS_ENSURE_SUCCESS(muDV->GetForceCharacterSet (&forceCharset),
NS_ERROR_FAILURE);
---
> NS_ENSURE_SUCCESS(muDV->GetDefaultCharacterSet (getter_Copies(defaultCharset)), NS_ERROR_FAILURE);
> NS_ENSURE_SUCCESS(muDV->GetForceCharacterSet
(getter_Copies(forceCharset)), NS_ERROR_FAILURE);
Severity: normal → major
Status: NEW → ASSIGNED
Priority: P3 → P2
Target Milestone: M12
Whiteboard: fix in hand. a couple of lines, only took a few seconds
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Whiteboard: fix in hand. a couple of lines, only took a few seconds
Updated•25 years ago
|
QA Contact: claudius → beard
Comment 4•25 years ago
|
||
beard can verify if desired
Comment 5•24 years ago
|
||
Verified fixed build 2001-02-06 -- source changed
Status: RESOLVED → VERIFIED
Updated•6 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•