Closed
Bug 203594
Opened 21 years ago
Closed 21 years ago
Memory leak of 96 bytes from 2 blocks allocated in PL_strdup
Categories
(SeaMonkey :: MailNews: Address Book & Contacts, defect)
Tracking
(Not tracked)
VERIFIED
DUPLICATE
of bug 203593
People
(Reporter: stephend, Assigned: sspitzer)
Details
(Keywords: memory-leak)
Build: Latest trunk pull on Windows 2000 under Purify. Steps to Reproduce: 1. mozilla.exe -addressbook 2. Click 'New Card' 3. Type "S" into any field. 4. Hit Save. [W] MLK: Memory leak of 96 bytes from 2 blocks allocated in PL_strdup Distribution of leaked blocks Allocation location malloc [dbgheap.c:129] PL_strdup [strdup.c:46] l = PL_strlen(s); => rv = (char *)malloc(l+1); if( (char *)0 == rv ) return rv; if( (const char *)0 == s ) PREF_CopyCharPref [prefapi.cpp:685] stringVal = pref->userPref.stringVal; if (stringVal) { => *return_buffer = PL_strdup(stringVal); result = PREF_OK; } } nsPrefBranch::GetCharPref(char const*,char * *) [nsPrefBranch.cpp:214] rv = getValidatedPrefName(aPrefName, &pref); if (NS_SUCCEEDED(rv)) { => rv = _convertRes(PREF_CopyCharPref(pref, _retval, mIsDefault)); } return rv; } nsPrefService::GetCharPref(char const*,char * *) [nsPrefService.h:57] public: NS_DECL_ISUPPORTS NS_DECL_NSIPREFSERVICE => NS_FORWARD_NSIPREFBRANCH(mRootBranch->) NS_DECL_NSIPREFBRANCHINTERNAL NS_DECL_NSIOBSERVER nsPref::CopyCharPref(char const*,char * *) [nsPref.cpp:183] nsCOMPtr<nsIPrefBranch> prefBranch = do_QueryInterface(mPrefService, &rv); if (NS_SUCCEEDED(rv)) => rv = prefBranch->GetCharPref(pref, return_buf); return rv; } DIR_GetStringPref [nsDirPrefs.cpp:1989] PL_strcat(scratch, "."); PL_strcat(scratch, prefLeaf); => if (PREF_NOERROR == pPref->CopyCharPref(scratch, &value)) { /* unfortunately, there may be some prefs out there which look like this */ if (!PL_strcmp(value, "(null)")) DIR_GetPrefsForOneServer(DIR_Server *,int,int) [nsDirPrefs.cpp:2898] // the string "s" is the default uri ( <scheme> + "://" + <filename> ) nsCString s(kMDBDirectoryRoot); s.Append (server->fileName); => server->uri = DIR_GetStringPref (prefstring, "uri", tempstring, s.get ()); server->lastSearchString = DIR_GetStringPref (prefstring, "searchString", tempstring, ""); nsAbDirProperty::GetDirectoryProperties(nsIAbDirectoryProperties * *) [nsAbDirProperty.cpp:330] rv = GetDirPrefId(prefId); NS_ENSURE_SUCCESS(rv,rv); server->prefName = nsCRT::strdup(prefId.get()); => DIR_GetPrefsForOneServer(server, PR_FALSE, PR_FALSE); // Now create the obj and move info in DIR_Server to it. nsCOMPtr <nsIAbDirectoryProperties> properties; nsAbDirectoryDataSource::createDirectoryTreeNameSortNode(nsIAbDirectory *,nsIRDFNode * *) [nsDirectoryDataSource.cpp:712] // Get directory type. nsCOMPtr <nsIAbDirectoryProperties> properties; => rv = directory->GetDirectoryProperties(getter_AddRefs(properties)); NS_ENSURE_SUCCESS(rv,rv); PRUint32 dirType; rv = properties->GetDirType(&dirType);
Reporter | ||
Updated•21 years ago
|
QA Contact: nbaca → technutz
Comment 2•21 years ago
|
||
marking dup this should be fixed by the patch to bug 203593. *** This bug has been marked as a duplicate of 203593 ***
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
Updated•20 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•