Closed Bug 13300 Opened 25 years ago Closed 25 years ago

MLK: nsProfile::GetSingleProfile()

Categories

(Core Graveyard :: Profile: BackEnd, defect, P3)

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: bruce, Assigned: alecf)

References

Details

rv = enumKeys->CurrentItem( &base ); That allocates an object. Please free! This code really needs more serious review I suspect. This is the 3rd leak so far tonight. [W] MLK: Memory leak of 2064 bytes from 1 block allocated in nsRegSubtreeEnumerator::CurrentItem(nsISupports * *) Distribution of leaked blocks 2064 bytes from 1 block of 2064 bytes (0x03743198) allocation number 28905 Allocation location new(UINT) [new.cpp:23] nsRegSubtreeEnumerator::CurrentItem(nsISupports * *) [nsRegistry.cpp:1092] nsProfile::GetSingleProfile(char * *) [nsProfile.cpp:613] GetProfileDirectory [nsFileLocations.cpp:101] nsSpecialFileSpec::=(Type::nsSpecialFileSpec) [nsFileLocations.cpp:299] nsSpecialFileSpec::nsSpecialFileSpec(Type::nsSpecialFileSpec) [nsFileLocations.cpp:225] nsSpecialFileSpec::=(Type::nsSpecialFileSpec) [nsFileLocations.cpp:248] nsSpecialFileSpec::nsSpecialFileSpec(Type::nsSpecialFileSpec) [nsFileLocations.cpp:225] nsSpecialFileSpec::=(Type::nsSpecialFileSpec) [nsFileLocations.cpp:346] nsFileLocator::GetFileLocation(UINT,nsIFileSpec * *) [nsFileLocations.cpp:466] NS_LocateFileOrDirectory(UINT) [nsIFileLocator.h:61] nsPref::useDefaultPrefFile(void) [nsPref.cpp:164] nsPref::ReadUserPrefs(void) [nsPref.cpp:297] nsPrefProfile::Startup(nsICmdLineService *) [nsAppRunner.cpp:637] main1 [nsAppRunner.cpp:798]
Blocks: 12696
Assignee: selmer → racham
Target Milestone: M11
Status: NEW → ASSIGNED
Will use nsCRT::free(). Changing status to assigned.
Assignee: racham → alecf
Status: ASSIGNED → NEW
Taking all these bugs to be fixed appropriately.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
racham, fixing this for you. You don't free nsISupports objects with nsCRT::free. Please look at my changes to learn how to use nsCOMPtr
Status: RESOLVED → VERIFIED
dev bug
Component: Profile Manager → Profile Manager BackEnd
Moving all Profile Manager bugs to new Profile Manager Backend component. Profile Manager component to be deleted.
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.