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)

Tracking

(Not tracked)

VERIFIED FIXED

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
will try to address for M12.
Whiteboard: fix in hand. a couple of lines, only took a few seconds
fixes a leak of 1-2 strings per child webshell
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Whiteboard: fix in hand. a couple of lines, only took a few seconds
fixed. r=karnaze
QA Contact: claudius → beard
beard can verify if desired
Verified fixed build 2001-02-06 -- source changed
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.