fix memory leak

git-svn-id: svn://10.0.0.236/trunk@34551 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mscott%netscape.com 1999-06-10 03:06:28 +00:00
parent 9c6c376512
commit f6a998a901
4 changed files with 6 additions and 0 deletions

View File

@ -395,6 +395,7 @@ void nsMessenger::InitializeFolderRoot()
// tack that folder name on to the root path...
m_folderPath = folderRoot;
m_folderPath += "Inbox";
PR_FREEIF(folderRoot);
} // if we have a folder root for the current server
// create Undo/Redo Transaction Manager

View File

@ -85,6 +85,9 @@ nsresult nsSmtpService::SendMailMessage(const nsFilePath& aFilePath, const nsStr
*aURL = urlToRun; // transfer our ref count to the caller....
else
NS_IF_RELEASE(urlToRun);
PR_FREEIF(hostName);
PR_FREEIF(senderName);
} // if we have an identity
else
NS_ASSERTION(0, "no current identity found for this user....");

View File

@ -281,6 +281,7 @@ nsresult nsSmtpUrl::CleanupSmtpState()
PR_FREEIF(m_organizationPart);
PR_FREEIF(m_replyToPart);
PR_FREEIF(m_priorityPart);
PR_FREEIF(m_toPart);
return NS_OK;
}

View File

@ -488,6 +488,7 @@ nsresult nsMailboxUrl::ParseSearchPart()
if (messageKey || m_messageID)
// the action for this mailbox must be a display message...
m_mailboxAction = nsMailboxActionDisplayMessage;
PR_FREEIF(messageKey);
}
return NS_OK;