MLK: nsProfile::GetSingleProfile()

VERIFIED FIXED in M11

Status

P3
normal
VERIFIED FIXED
20 years ago
3 years ago

People

(Reporter: bruce, Assigned: alecf)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

20 years ago
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]

Updated

20 years ago
Blocks: 12696

Updated

20 years ago
Assignee: selmer → racham
Target Milestone: M11

Updated

20 years ago
Status: NEW → ASSIGNED

Comment 1

20 years ago
Will use nsCRT::free(). Changing status to assigned.
(Assignee)

Updated

20 years ago
Assignee: racham → alecf
Status: ASSIGNED → NEW
(Assignee)

Comment 2

20 years ago
Taking all these bugs to be fixed appropriately.
(Assignee)

Updated

20 years ago
Status: NEW → RESOLVED
Last Resolved: 20 years ago
Resolution: --- → FIXED
(Assignee)

Comment 3

20 years ago
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

Updated

20 years ago
Status: RESOLVED → VERIFIED

Comment 4

20 years ago
dev bug

Updated

19 years ago
Component: Profile Manager → Profile Manager BackEnd

Comment 5

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