mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-02 07:05:24 +00:00
fix memory leak copying multiple messages to an imap folder from a different account, 213688, sr=mscott
This commit is contained in:
parent
14bd7a4133
commit
cc1f8a6341
@ -2874,7 +2874,8 @@ NS_IMETHODIMP nsImapMailFolder::BeginCopy(nsIMsgDBHdr *message)
|
||||
if (NS_SUCCEEDED(rv) && m_copyState->m_tmpFileSpec)
|
||||
rv = m_copyState->m_tmpFileSpec->OpenStreamForWriting();
|
||||
|
||||
m_copyState->m_dataBuffer = (char*) PR_CALLOC(COPY_BUFFER_SIZE+1);
|
||||
if (!m_copyState->m_dataBuffer)
|
||||
m_copyState->m_dataBuffer = (char*) PR_CALLOC(COPY_BUFFER_SIZE+1);
|
||||
if (!m_copyState->m_dataBuffer)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
m_copyState->m_dataBufferSize = COPY_BUFFER_SIZE;
|
||||
|
Loading…
Reference in New Issue
Block a user