Closed Bug 154055 Opened 22 years ago Closed 8 years ago

Memory leak of 12 bytes from 1 block allocated in MimeMultipartRelated_output_child_p

Categories

(MailNews Core :: MIME, defect)

x86
Windows 2000
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: stephend, Unassigned)

References

Details

(Keywords: memory-leak, Whiteboard: [needs purify])

Windows 2000, using Purify - opening the American Greetings (bring your own 
brain) template (but I copied it to my Local Draft Folder to reproduce this 
bug) results in:

[W] MLK: Memory leak of 12 bytes from 1 block allocated in 
MimeMultipartRelated_output_child_p
    Distribution of leaked blocks
    Allocation location
    new(UINT)      [MSVCRT.DLL]
    MimeMultipartRelated_output_child_p [mimemrel.cpp:530]
                   (This happens primarily on Windows and Unix.) */
                if (PL_strchr(part, ' ') || PL_strchr(part, '>') || PL_strchr
(part, '%'))
                  temp = escape_for_mrel_subst(part);
 =>               MimeHashValue * value = new MimeHashValue(child, temp);
                  PL_HashTableAdd(relobj->hash, absolute, value);
    
                /* rhp - If this part ALSO has a Content-ID we need to put that 
into
    MimeMultipart_create_child [mimemult.cpp:452]
      /* Now that we've added this new object to our list of children,
         start its parser going (if we want to display it.)
       */
 =>   body->output_p = (((MimeMultipartClass *) obj->clazz)->output_child_p
(obj, body));
      if (body->output_p)
        {
          status = body->clazz->parse_begin(body);
    MimeMultipart_parse_line [mimemult.cpp:219]
          //
          if (*line == nsCRT::CR || *line == nsCRT::LF)
          {
 =>         status = ((MimeMultipartClass *) obj->clazz)->create_child(obj);
            if (status < 0) return status;
            PR_ASSERT(mult->state != MimeMultipartHeaders);
    
    convert_and_send_buffer [mimebuf.cpp:168]
        }
    #endif
    
 =>   return (*per_line_fn)(buf, length, closure);
    }
    
    extern "C" int
    mime_LineBuffer [mimebuf.cpp:255]
    
          status = convert_and_send_buffer(*bufferP, *buffer_fpP,
                                               convert_newlines_p,
 =>                                            per_line_fn, closure);
          if (status < 0)
              return status;
        
    MimeObject_parse_buffer [mimeobj.cpp:260]
    ???            [ip=0x098ad840]
    MimeMessage_parse_line [mimemsg.cpp:226]
    convert_and_send_buffer [mimebuf.cpp:168]
    mime_LineBuffer [mimebuf.cpp:255]
    MimeObject_parse_buffer [mimeobj.cpp:260]
    ???            [ip=0x0989b060]
    mime_display_stream_write [mimemoz2.cpp:909]
    nsStreamConverter::OnDataAvailable(nsIRequest *,nsISupports 
*,nsIInputStream *,UINT,UINT) [nsStreamConverter.cpp:908]
    nsMailboxProtocol::ReadMessageResponse(nsIInputStream *,UINT,UINT) 
[nsMailboxProtocol.cpp:626]
    nsMailboxProtocol::ProcessProtocolState(nsIURI *,nsIInputStream 
*,UINT,UINT) [nsMailboxProtocol.cpp:717]
    nsMsgProtocol::OnDataAvailable(nsIRequest *,nsISupports *,nsIInputStream 
*,UINT,UINT) [nsMsgProtocol.cpp:305]
    nsOnDataAvailableEvent::HandleEvent(void) [nsStreamListenerProxy.cpp:193]
    PL_HandleEvent [plevent.c:596]
Keywords: mlk
QA Contact: gayatri → stephend
Product: MailNews → Core
Assignee: ducarroz → nobody
QA Contact: stephend → mime
Product: Core → MailNews Core
stephen, can you still reproduce this memory leak ?
(In reply to comment #1)
> stephen, can you still reproduce this memory leak ?

I don't run Purify anymore, so I don't know... :-(
Severity: normal → minor
Whiteboard: [needs purify]
Chiaki, if this issue still existed, would it have already been revealed by coverity?
Flags: needinfo?(ishikawa)
(In reply to Wayne Mery (:wsmwk, NI for questions) from comment #3)
> Chiaki, if this issue still existed, would it have already been revealed by
> coverity?

If this still existed, I think coverity would have found it.
Yes, maybe I should dig into coverity's outstanding issues.
(Too bad, not many progrmmers stood up and fixed the coverity issues I posted.
I am going to submit the rest (about half a dozen or dozen issues) to bugzilla and
begin posting fixes.
But my annual exhibition time is approaching fast, and I suspect I can contribute programming-wise only in October, and the rest of the year will be more like just commenting occasionally.
At least I had the time to brush up the enabling buffer patch(es).
Flags: needinfo?(ishikawa)
Yeah, I wouldn't worry about it.  It's all being rewritten to jsmime anyway
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.