fix memory leak copying multiple messages to an imap folder from a different account, 213688, sr=mscott

This commit is contained in:
bienvenu%nventure.com 2004-04-27 19:52:41 +00:00
parent 14bd7a4133
commit cc1f8a6341

View File

@ -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;