From d58487c55f3a6788ce0608f819c856ab7996af67 Mon Sep 17 00:00:00 2001 From: "putterman%netscape.com" Date: Tue, 30 Mar 1999 02:24:18 +0000 Subject: [PATCH] fixed freeing mismatched memory error. --- mailnews/base/build/nsMsgFactory.cpp | 4 ++-- mailnews/compose/build/nsMsgCompFactory.cpp | 4 ++-- mailnews/db/msgdb/src/nsMsgDatabase.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mailnews/base/build/nsMsgFactory.cpp b/mailnews/base/build/nsMsgFactory.cpp index ce82705c03b1..3c2911d07e3e 100644 --- a/mailnews/base/build/nsMsgFactory.cpp +++ b/mailnews/base/build/nsMsgFactory.cpp @@ -108,8 +108,8 @@ nsMsgFactory::~nsMsgFactory() NS_ASSERTION(mRefCnt == 0, "non-zero refcnt at destruction"); NS_IF_RELEASE(mServiceManager); - delete[] mClassName; - delete[] mProgID; + PL_strfree(mClassName); + PL_strfree(mProgID); } nsresult diff --git a/mailnews/compose/build/nsMsgCompFactory.cpp b/mailnews/compose/build/nsMsgCompFactory.cpp index 692568123e28..7d074e806740 100644 --- a/mailnews/compose/build/nsMsgCompFactory.cpp +++ b/mailnews/compose/build/nsMsgCompFactory.cpp @@ -98,8 +98,8 @@ nsMsgComposeFactory::~nsMsgComposeFactory() NS_ASSERTION(mRefCnt == 0, "non-zero refcnt at destruction"); NS_IF_RELEASE(mServiceManager); - delete[] mClassName; - delete[] mProgID; + PL_strfree(mClassName); + PL_strfree(mProgID); } nsresult nsMsgComposeFactory::QueryInterface(const nsIID &aIID, void **aResult) diff --git a/mailnews/db/msgdb/src/nsMsgDatabase.cpp b/mailnews/db/msgdb/src/nsMsgDatabase.cpp index 605c42bf4ae4..1ba559ecf292 100644 --- a/mailnews/db/msgdb/src/nsMsgDatabase.cpp +++ b/mailnews/db/msgdb/src/nsMsgDatabase.cpp @@ -102,11 +102,11 @@ nsMsgDatabase::CreateMsgHdr(nsIMdbRow* hdrRow, nsFileSpec& path, nsMsgKey key, n if (NS_FAILED(rv)) return rv; char* msgURI = PR_smprintf("%s#%d", folderURI, key); - delete[] folderURI; + delete folderURI; nsIRDFResource* res; rv = rdf->GetResource(msgURI, &res); - delete[] msgURI; + PR_smprintf_free(msgURI); if (NS_FAILED(rv)) return rv; nsMsgHdr* msgHdr = (nsMsgHdr*)res;