Closed
Bug 235410
Opened 21 years ago
Closed 21 years ago
LocaleObject leak in nsCollationOS2::CompareString()
Categories
(Core :: Internationalization, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: bird-mozilla, Assigned: mkaply)
Details
Attachments
(1 file)
822 bytes,
patch
|
jhpedemonte
:
review+
|
Details | Diff | Splinter Review |
User-Agent:
Build Identifier: Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.6) Gecko/20040117
There is a leak of 'LocalObject's in nsCollationOS2::CompareString()
(http://lxr.mozilla.org/seamonkey/source/intl/locale/src/os2/nsCollationOS2.cpp#78).
Before calling UniStrcoll() a local object, locObj, is created, however it's not
freed when the locObj variable goes out of scope at the end of the function.
Fix:
Add 'UniFreeLocaleObject(locObj);' at the end of the function.
Another problem, error handling is non existant. If someone else should leak
LocaleObject's that will eventually cause the create call to fail, even for
"en_US". The code should check the return code before calling UniStrcoll()
unless a crash is actually desired un such an occaction.
Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Assignee | ||
Comment 1•21 years ago
|
||
I can't believe this has been around this long. argh.
Assignee: smontagu → mkaply
Status: UNCONFIRMED → ASSIGNED
Assignee | ||
Updated•21 years ago
|
Attachment #142181 -
Flags: review?(pedemont)
Updated•21 years ago
|
Attachment #142181 -
Flags: review?(pedemont) → review+
Assignee | ||
Comment 2•21 years ago
|
||
fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•