Closed Bug 66418 Opened 25 years ago Closed 25 years ago

nsUrlbarHistory::CheckItemAvailability leaks string

Categories

(SeaMonkey :: Location Bar, defect, P2)

x86
Linux
defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9

People

(Reporter: dbaron, Assigned: alecf)

Details

(Keywords: memory-leak, Whiteboard: fix in hand)

Attachments

(1 file)

nsUrlbarHistory::CheckItemAvailability leaks |char * searchCStr| if it returns early. I saw this with the boehm GC. Possible ways to fix: * put in nsMemory::Free all over the place (ugly) * use nsXPIDLCString searchCStr and assign to it with the statement: *getter_Copies(searchCstr) = searchURL.ToNewCString(); * use nsCAutoString
Actually, I take that back. The better way to fix this is not to convert to C strings at all, since the only place searchCStr is used is to compare to arrayCString, which is also converted from a PRUnichar*. nsCRT has an strcasecmp that takes PRUnichar* instead of char*.
moving these bugs to History: URLBar
Assignee: radha → alecf
Component: History: Session → History: URLBar
got me a fix... looking for reviewer/super-reviewer.
Status: NEW → ASSIGNED
Keywords: patch
Priority: -- → P2
Whiteboard: fix in hand
Target Milestone: --- → mozilla0.8
close to what I had in my local tree. r=radha
moving "fix in hand" bugs to moz 0.9
Target Milestone: mozilla0.8 → mozilla0.9
fix is in
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
mass-verifying claudius' Fixed bugs which haven't changed since 2001.12.31. if you think this particular bug is not fixed, please make sure of the following before reopening: a. retest with a *recent* trunk build. b. query bugzilla to see if there's an existing, open bug (new, reopened, assigned) that covers your issue. c. if this does need to be reopened, make sure there are specific steps to reproduce (unless already provided and up-to-date). thanks! [set your search string in mail to "AmbassadorKoshNaranek" to filter out these messages.]
Status: RESOLVED → VERIFIED
Product: Core → SeaMonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: