[MLK] Leaking C string

VERIFIED FIXED in mozilla0.9.4

Status

()

Core
Security: CAPS
P1
normal
VERIFIED FIXED
17 years ago
17 years ago

People

(Reporter: Patrick C. Beard, Assigned: Mitchell Stoltz (not reading bugmail))

Tracking

({memory-leak})

Trunk
mozilla0.9.4
memory-leak
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: patch, URL)

Attachments

(2 attachments)

(Reporter)

Description

17 years ago
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.
(Reporter)

Updated

17 years ago
Keywords: mlk

Comment 1

17 years ago
Created attachment 42997 [details] [diff] [review]
possible patch if I understand this right
Jarrod, I'd suggest using nsXPIDLCString here instead, if you do that you don't
need to worry about freeing the string at all.
(Assignee)

Comment 3

17 years ago
I'm going to piggyback this fix on another fix to securityManager.
Status: NEW → ASSIGNED
Whiteboard: patch
Target Milestone: --- → mozilla0.9.4
(Assignee)

Comment 4

17 years ago
*** Bug 90819 has been marked as a duplicate of this bug. ***
(Assignee)

Comment 5

17 years ago
Target is now 0.9.4, Priority P1.
Priority: -- → P1
(Reporter)

Comment 7

17 years ago
r=beard
(Assignee)

Comment 8

17 years ago
Fix checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED

Comment 9

17 years ago
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.