Closed Bug 98850 Opened 23 years ago Closed 23 years ago

MLK: Memory leak of 1628 bytes from 25 blocks allocated in nsLocalFile::ParseURL

Categories

(Core :: XPCOM, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 102996
Future

People

(Reporter: stephend, Assigned: dougt)

References

()

Details

(Keywords: helpwanted, memory-leak)

Sorry Doug, no clue where global nsLocalFile::ParseURL would fit in the 
product/component world, but I do see that you've coded 

    [W] MLK: Memory leak of 1628 bytes from 25 blocks allocated in PL_strdup
        Distribution of leaked blocks
        Allocation location
        malloc+0xc           [dbgheap.c:129 ip=0x002e3c3c]
        PL_strdup+0x75       [.\../../../../lib/libc/src/strdup.c:46 
ip=0x004c15a5]
        nsCRT::strdup(char const*)+0x24 [.\..\..\dist\include\nsCRT.h:167 
ip=0x1000e8c4]
        nsLocalFile::ParseURL(char const*,char * *,char * *,char * *,char * *)
+0x42b [c:\moz_src\mozilla\xpcom\io\nsLocalFileCommon.cpp:408 ip=0x100d7d7b]
        
            rv = NS_OK;
            char* eSpec = nsnull;
     =>     eSpec = nsCRT::strdup(inURL);
            if (!eSpec)
                return NS_ERROR_OUT_OF_MEMORY;
        
        nsLocalFile::SetURL(char const*)+0x2a6 
[c:\moz_src\mozilla\xpcom\io\nsLocalFileWin.cpp:1931 ip=0x100c6486]
        nsResURL::GetFile(nsIFile * *)+0x413 
[c:\moz_src\mozilla\netwerk\protocol\res\src\nsResURL.cpp:73 ip=0x050811a3]
                    do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv);
            if (NS_FAILED(rv)) return rv;
        
     =>     rv = localFile->SetURL(spec);
            if (NS_FAILED(rv)) return rv;
        
            return CallQueryInterface(localFile, result);
        nsJARChannel::EnsureJARFileAvailable(void)+0x434 
[c:\moz_src\mozilla\netwerk\protocol\jar\src\nsJARChannel.cpp:308 ip=0x05071ef4]
            // try to get a nsIFile directly from the url, which will often 
succeed.
            fileURL = do_QueryInterface(mJARBaseURI);
            if (fileURL)
     =>         fileURL->GetFile(getter_AddRefs(mDownloadedJARFile));
        
            if (mDownloadedJARFile) {
                // after successfully downloading the jar file to the cache,
    nsJARChannel::Open(nsIInputStream * *)+0x72 
[c:\moz_src\mozilla\netwerk\protocol\jar\src\nsJARChannel.cpp:257 ip=0x05071742]
            nsAutoCMonitor mon(this);
            nsresult rv;
            mSynchronousRead = PR_TRUE;
     =>     rv = EnsureJARFileAvailable();
            if (NS_FAILED(rv)) return rv;
            if (mSynchronousInputStream == nsnull)
                mon.Wait();
    NS_OpenURI(nsIInputStream * *,nsIURI *,nsIIOService *,nsILoadGroup 
*,nsIInterfaceRequestor *,UINT)+0x1a4 [.\..\..\dist\include\nsNetUtil.h:176 
ip=0x0552db04]
    nsExpatTokenizer::OpenInputStream(nsString const&,nsString 
const&,nsIInputStream * *,nsString *)+0x2c4 
[c:\moz_src\mozilla\htmlparser\src\nsExpatTokenizer.cpp:847 ip=0x0552d4b4]
            rv = NS_NewURI(getter_AddRefs(uri), aURLStr, baseURI);
            if (NS_SUCCEEDED(rv) && uri) {
              if (IsLoadableDTD(address_of(uri))) {
     =>         rv = NS_OpenURI(in, uri);
                char* absURL = nsnull;
                uri->GetSpec(&absURL);
                aAbsURL->AppendWithConversion(absURL);
Bug 98843, bug 98847, bug 98848, bug 98849, bug 98850, bug 98846 and bug 98841 
all were a result of:

Launching mozilla.exe -compose, typing stephe (letting it search from a local 
addressbook for <stephend@netscape.com>, moving the selection down 3 times to 
highlight the above email address, hitting return 3 times, typing nothing in 
the message body, nothing in the subject, and simply hitting OK to send the 
dialog.
Poor doug ;-(
Assignee: kandrot → dougt
Keywords: helpwanted
Target Milestone: --- → Future
This is a dup of bug 102996

*** This bug has been marked as a duplicate of 102996 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Indeed it is, verified DUP (thanks)
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.