Closed Bug 91619 Opened 25 years ago Closed 25 years ago

[MLK] Leaking C string

Categories

(Core :: Security: CAPS, defect, P1)

defect

Tracking

()

VERIFIED FIXED
mozilla0.9.4

People

(Reporter: beard, Assigned: security-bugs)

References

()

Details

(Keywords: memory-leak, Whiteboard: patch)

Attachments

(2 files)

Go to the URL field above, the hilited line assigns to the local variable |char * id|, and the result returned from SecurityGetCharPref() leaks. The actual string value that appears to be leaking is "http://www.netscape.com" on my machine.
Keywords: mlk
Jarrod, I'd suggest using nsXPIDLCString here instead, if you do that you don't need to worry about freeing the string at all.
I'm going to piggyback this fix on another fix to securityManager.
Status: NEW → ASSIGNED
Whiteboard: patch
Target Milestone: --- → mozilla0.9.4
*** Bug 90819 has been marked as a duplicate of this bug. ***
Target is now 0.9.4, Priority P1.
Priority: -- → P1
Attached patch Patch — — Splinter Review
r=beard
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Verified on build: 2001-09-13-0.9.4 platform: Win NT Marking verified as per above developer comments.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: