From 4b8ca2af7869e2df325d67339ce65f4539847ddc Mon Sep 17 00:00:00 2001 From: "sayrer%gmail.com" Date: Fri, 8 Sep 2006 04:35:17 +0000 Subject: [PATCH] bug 348669. Remove inappropriate nsCRT::free usage. r=timeless, sr=dbaron git-svn-id: svn://10.0.0.236/trunk@209419 18797224-902f-48f8-a5cc-f745e15eee43 --- .../components/bookmarks/src/nsBookmarksService.cpp | 10 +++++----- .../migration/src/nsBrowserProfileMigratorUtils.cpp | 3 +-- .../migration/src/nsDogbertProfileMigrator.cpp | 2 +- .../migration/src/nsOperaProfileMigrator.cpp | 4 ++-- .../migration/src/nsSafariProfileMigrator.cpp | 2 +- .../migration/src/nsSeamonkeyProfileMigrator.cpp | 6 +++--- mozilla/editor/composer/src/nsComposerCommands.cpp | 6 +++--- .../editor/libeditor/base/ChangeCSSInlineStyleTxn.cpp | 2 +- mozilla/editor/libeditor/base/DeleteElementTxn.cpp | 8 ++++---- mozilla/editor/libeditor/html/nsHTMLDataTransfer.cpp | 6 +++--- .../editor/libeditor/text/nsPlaintextDataTransfer.cpp | 2 +- mozilla/editor/libeditor/text/nsPlaintextEditor.cpp | 2 +- mozilla/layout/forms/nsIsIndexFrame.cpp | 2 +- mozilla/layout/generic/nsImageMap.cpp | 2 +- mozilla/layout/generic/nsObjectFrame.cpp | 2 +- mozilla/layout/printing/nsPrintData.cpp | 2 +- mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp | 2 +- .../streamconv/converters/nsGopherDirListingConv.cpp | 4 ++-- mozilla/profile/pref-migrator/src/nsPrefMigration.cpp | 4 ++-- mozilla/rdf/base/src/nsInMemoryDataSource.cpp | 2 +- mozilla/rdf/base/src/nsRDFContentSink.cpp | 2 +- mozilla/security/manager/ssl/src/nsCrypto.cpp | 4 ++-- mozilla/widget/src/mac/nsClipboard.cpp | 4 ++-- mozilla/widget/src/mac/nsDragService.cpp | 4 ++-- mozilla/widget/src/mac/nsMimeMapper.cpp | 2 +- mozilla/xpfe/browser/src/nsBrowserInstance.cpp | 4 ++-- .../components/bookmarks/src/nsBookmarksService.cpp | 10 +++++----- 27 files changed, 51 insertions(+), 52 deletions(-) diff --git a/mozilla/browser/components/bookmarks/src/nsBookmarksService.cpp b/mozilla/browser/components/bookmarks/src/nsBookmarksService.cpp index efd5af95ba8..638a6e416d9 100644 --- a/mozilla/browser/components/bookmarks/src/nsBookmarksService.cpp +++ b/mozilla/browser/components/bookmarks/src/nsBookmarksService.cpp @@ -1783,7 +1783,7 @@ nsBookmarksService::getLocaleString(const char *key, nsString &str) && (keyUni)) { str = keyUni; - nsCRT::free(keyUni); + NS_Free(keyUni); } else { @@ -5099,7 +5099,7 @@ nsBookmarksService::WriteBookmarkIdAndName(nsIRDFDataSource *aDs, rv |= aStrm->Write(kIDEquals, sizeof(kIDEquals)-1, &dummy); rv |= aStrm->Write(escapedID, strlen(escapedID), &dummy); rv |= aStrm->Write(kQuoteStr, sizeof(kQuoteStr)-1, &dummy); - nsCRT::free(escapedID); + NS_Free(escapedID); } } @@ -5131,7 +5131,7 @@ nsBookmarksService::WriteBookmarkIdAndName(nsIRDFDataSource *aDs, if (escapedAttrib) { rv = aStrm->Write(escapedAttrib, strlen(escapedAttrib), &dummy); - nsCRT::free(escapedAttrib); + NS_Free(escapedAttrib); } return rv; } @@ -5195,12 +5195,12 @@ nsBookmarksService::WriteBookmarkProperties(nsIRDFDataSource *aDs, { rv |= aStrm->Write(kQuoteStr, sizeof(kQuoteStr)-1, &dummy); } - nsCRT::free(escapedAttrib); + NS_Free(escapedAttrib); escapedAttrib = nsnull; } } } - nsCRT::free(attribute); + NS_Free(attribute); attribute = nsnull; } } diff --git a/mozilla/browser/components/migration/src/nsBrowserProfileMigratorUtils.cpp b/mozilla/browser/components/migration/src/nsBrowserProfileMigratorUtils.cpp index e65fe680164..f774249fae9 100644 --- a/mozilla/browser/components/migration/src/nsBrowserProfileMigratorUtils.cpp +++ b/mozilla/browser/components/migration/src/nsBrowserProfileMigratorUtils.cpp @@ -59,7 +59,6 @@ #include "nsIStringBundle.h" #include "nsISupportsArray.h" #include "nsXPCOMCID.h" -#include "nsCRT.h" #define MIGRATION_BUNDLE "chrome://browser/locale/migration/migration.properties" @@ -146,7 +145,7 @@ void GetMigrateDataFromArray(MigrationData* aDataArray, PRInt32 aDataArrayLength if (exists) *aResult |= cursor->sourceFlag; } - nsCRT::free(cursor->fileName); + NS_Free(cursor->fileName); cursor->fileName = nsnull; } } diff --git a/mozilla/browser/components/migration/src/nsDogbertProfileMigrator.cpp b/mozilla/browser/components/migration/src/nsDogbertProfileMigrator.cpp index 9aff14bf324..e54ec1057c7 100644 --- a/mozilla/browser/components/migration/src/nsDogbertProfileMigrator.cpp +++ b/mozilla/browser/components/migration/src/nsDogbertProfileMigrator.cpp @@ -591,7 +591,7 @@ nsDogbertProfileMigrator::FixDogbertCookies() // correct the expires field char* expiresCString = ToNewCString(expiresString); unsigned long expires = strtoul(expiresCString, nsnull, 10); - nsCRT::free(expiresCString); + NS_Free(expiresCString); // if the cookie is supposed to expire at the end of the session // expires == 0. don't adjust those cookies. diff --git a/mozilla/browser/components/migration/src/nsOperaProfileMigrator.cpp b/mozilla/browser/components/migration/src/nsOperaProfileMigrator.cpp index c31841c94ac..82ec90322c7 100644 --- a/mozilla/browser/components/migration/src/nsOperaProfileMigrator.cpp +++ b/mozilla/browser/components/migration/src/nsOperaProfileMigrator.cpp @@ -435,7 +435,7 @@ nsOperaProfileMigrator::CopyPreferences(PRBool aReplace) transform->prefSetterFunc(transform, branch); } if (colorString) - nsCRT::free(colorString); + free(colorString); } else { nsCAutoString val; @@ -462,7 +462,7 @@ nsOperaProfileMigrator::CopyPreferences(PRBool aReplace) transform->prefHasValue = PR_TRUE; transform->prefSetterFunc(transform, branch); if (transform->type == _OPM(STRING) && transform->stringValue) { - nsCRT::free(transform->stringValue); + NS_Free(transform->stringValue); transform->stringValue = nsnull; } } diff --git a/mozilla/browser/components/migration/src/nsSafariProfileMigrator.cpp b/mozilla/browser/components/migration/src/nsSafariProfileMigrator.cpp index 0aa5187ae4f..fa497a4ca71 100644 --- a/mozilla/browser/components/migration/src/nsSafariProfileMigrator.cpp +++ b/mozilla/browser/components/migration/src/nsSafariProfileMigrator.cpp @@ -301,7 +301,7 @@ GetNullTerminatedString(CFStringRef aStringRef) void FreeNullTerminatedString(char* aString) { - nsCRT::free(aString); + free(aString); aString = nsnull; } diff --git a/mozilla/browser/components/migration/src/nsSeamonkeyProfileMigrator.cpp b/mozilla/browser/components/migration/src/nsSeamonkeyProfileMigrator.cpp index b34c14b3cd5..d5301310266 100644 --- a/mozilla/browser/components/migration/src/nsSeamonkeyProfileMigrator.cpp +++ b/mozilla/browser/components/migration/src/nsSeamonkeyProfileMigrator.cpp @@ -570,7 +570,7 @@ nsSeamonkeyProfileMigrator::WriteFontsBranch(nsIPrefService* aPrefService, switch (pref->type) { case nsIPrefBranch::PREF_STRING: rv = branch->SetCharPref(pref->prefName, pref->stringValue); - nsCRT::free(pref->stringValue); + PL_strfree(pref->stringValue); pref->stringValue = nsnull; break; case nsIPrefBranch::PREF_BOOL: @@ -585,11 +585,11 @@ nsSeamonkeyProfileMigrator::WriteFontsBranch(nsIPrefService* aPrefService, rv = branch->SetComplexValue(pref->prefName, NS_GET_IID(nsIPrefLocalizedString), pls); - nsCRT::free(pref->wstringValue); + NS_Free(pref->wstringValue); pref->wstringValue = nsnull; break; } - nsCRT::free(pref->prefName); + NS_Free(pref->prefName); pref->prefName = nsnull; delete pref; pref = nsnull; diff --git a/mozilla/editor/composer/src/nsComposerCommands.cpp b/mozilla/editor/composer/src/nsComposerCommands.cpp index ef90ceef343..ba8813f44f7 100644 --- a/mozilla/editor/composer/src/nsComposerCommands.cpp +++ b/mozilla/editor/composer/src/nsComposerCommands.cpp @@ -325,7 +325,7 @@ nsListCommand::GetCurrentState(nsIEditor *aEditor, const char* aTagName, aParams->SetBooleanValue(STATE_ALL, !bMixed && inList); aParams->SetBooleanValue(STATE_MIXED, bMixed); aParams->SetBooleanValue(STATE_ENABLED, PR_TRUE); - if (tagStr) nsCRT::free(tagStr); + if (tagStr) NS_Free(tagStr); return NS_OK; } @@ -429,7 +429,7 @@ nsListItemCommand::ToggleState(nsIEditor *aEditor, const char* aTagName) { rv = htmlEditor->RemoveList(nsDependentString(tagStr)); } - nsCRT::free(tagStr); + NS_Free(tagStr); } } else @@ -465,7 +465,7 @@ nsRemoveListCommand::IsCommandEnabled(const char * aCommandName, *outCmdEnabled = bMixed ? PR_TRUE : (tagStr && *tagStr); - if (tagStr) nsCRT::free(tagStr); + if (tagStr) NS_Free(tagStr); } else *outCmdEnabled = PR_FALSE; diff --git a/mozilla/editor/libeditor/base/ChangeCSSInlineStyleTxn.cpp b/mozilla/editor/libeditor/base/ChangeCSSInlineStyleTxn.cpp index 48c6ed98591..36d46a2a25f 100644 --- a/mozilla/editor/libeditor/base/ChangeCSSInlineStyleTxn.cpp +++ b/mozilla/editor/libeditor/base/ChangeCSSInlineStyleTxn.cpp @@ -100,7 +100,7 @@ ChangeCSSInlineStyleTxn::ValueIncludes(const nsAString &aValueList, const nsAStr } start = ++end; } - nsCRT::free(value); + NS_Free(value); return result; } diff --git a/mozilla/editor/libeditor/base/DeleteElementTxn.cpp b/mozilla/editor/libeditor/base/DeleteElementTxn.cpp index 3106644d2d4..34a86778a99 100644 --- a/mozilla/editor/libeditor/base/DeleteElementTxn.cpp +++ b/mozilla/editor/libeditor/base/DeleteElementTxn.cpp @@ -102,8 +102,8 @@ NS_IMETHODIMP DeleteElementTxn::DoTransaction(void) if (gNoisy) printf(" DeleteElementTxn: deleting child %s from parent %s\n", c, p); - nsCRT::free(c); - nsCRT::free(p); + NS_Free(c); + NS_Free(p); } // end debug output #endif @@ -147,8 +147,8 @@ NS_IMETHODIMP DeleteElementTxn::UndoTransaction(void) if (gNoisy) printf(" DeleteElementTxn: inserting child %s back into parent %s\n", c, p); - nsCRT::free(c); - nsCRT::free(p); + NS_Free(c); + NS_Free(p); } // end debug output #endif diff --git a/mozilla/editor/libeditor/html/nsHTMLDataTransfer.cpp b/mozilla/editor/libeditor/html/nsHTMLDataTransfer.cpp index 971c738c13e..8e9e389e047 100644 --- a/mozilla/editor/libeditor/html/nsHTMLDataTransfer.cpp +++ b/mozilla/editor/libeditor/html/nsHTMLDataTransfer.cpp @@ -1389,7 +1389,7 @@ NS_IMETHODIMP nsHTMLEditor::InsertFromTransferable(nsITransferable *transferable rv = NS_ERROR_NOT_IMPLEMENTED; // for now give error code } } - nsCRT::free(bestFlavor); + NS_Free(bestFlavor); // Try to scroll the selection into view if the paste/drop succeeded if (NS_SUCCEEDED(rv)) @@ -2055,7 +2055,7 @@ NS_IMETHODIMP nsHTMLEditor::PasteAsPlaintextQuotation(PRInt32 aSelectionType) rv = InsertAsPlaintextQuotation(stuffToPaste, PR_TRUE, 0); } } - nsCRT::free(flav); + NS_Free(flav); } return rv; @@ -2670,7 +2670,7 @@ void nsHTMLEditor::FreeTagStackStrings(nsVoidArray &tagStack) { PRUnichar* str = (PRUnichar*)tagStack.ElementAt(i); if (str) { - nsCRT::free(str); + NS_Free(str); } } } diff --git a/mozilla/editor/libeditor/text/nsPlaintextDataTransfer.cpp b/mozilla/editor/libeditor/text/nsPlaintextDataTransfer.cpp index 8edf05743d3..730e6a64544 100644 --- a/mozilla/editor/libeditor/text/nsPlaintextDataTransfer.cpp +++ b/mozilla/editor/libeditor/text/nsPlaintextDataTransfer.cpp @@ -131,7 +131,7 @@ NS_IMETHODIMP nsPlaintextEditor::InsertTextFromTransferable(nsITransferable *aTr rv = InsertTextAt(stuffToPaste, aDestinationNode, aDestOffset, aDoDeleteSelection); } } - nsCRT::free(bestFlavor); + NS_Free(bestFlavor); // Try to scroll the selection into view if the paste/drop succeeded if (NS_SUCCEEDED(rv)) diff --git a/mozilla/editor/libeditor/text/nsPlaintextEditor.cpp b/mozilla/editor/libeditor/text/nsPlaintextEditor.cpp index 5634a65e8bb..802497a1093 100644 --- a/mozilla/editor/libeditor/text/nsPlaintextEditor.cpp +++ b/mozilla/editor/libeditor/text/nsPlaintextEditor.cpp @@ -1328,7 +1328,7 @@ nsPlaintextEditor::PasteAsQuotation(PRInt32 aSelectionType) rv = InsertAsQuotation(stuffToPaste, 0); } } - nsCRT::free(flav); + NS_Free(flav); } return rv; diff --git a/mozilla/layout/forms/nsIsIndexFrame.cpp b/mozilla/layout/forms/nsIsIndexFrame.cpp index b4e65acc0fc..dc7c94cf25d 100644 --- a/mozilla/layout/forms/nsIsIndexFrame.cpp +++ b/mozilla/layout/forms/nsIsIndexFrame.cpp @@ -528,7 +528,7 @@ nsIsIndexFrame::URLEncode(const nsString& aString, nsIUnicodeEncoder* encoder, n char* outBuf = nsEscape(convertedBuf, url_XPAlphas); oString.AssignASCII(outBuf); - nsCRT::free(outBuf); + nsMemory::Free(outBuf); nsMemory::Free(convertedBuf); } diff --git a/mozilla/layout/generic/nsImageMap.cpp b/mozilla/layout/generic/nsImageMap.cpp index 0dd5758977a..17547ee743d 100644 --- a/mozilla/layout/generic/nsImageMap.cpp +++ b/mozilla/layout/generic/nsImageMap.cpp @@ -323,7 +323,7 @@ void Area::ParseCoords(const nsAString& aSpec) char* cp = ToNewCString(aSpec); if (cp) { mCoords = lo_parse_coord_list(cp, &mNumCoords); - nsCRT::free(cp); + NS_Free(cp); } } diff --git a/mozilla/layout/generic/nsObjectFrame.cpp b/mozilla/layout/generic/nsObjectFrame.cpp index 119dece3703..530e1f9308a 100644 --- a/mozilla/layout/generic/nsObjectFrame.cpp +++ b/mozilla/layout/generic/nsObjectFrame.cpp @@ -1594,7 +1594,7 @@ nsPluginInstanceOwner::~nsPluginInstanceOwner() } if (mTagText) { - nsCRT::free(mTagText); + NS_Free(mTagText); mTagText = nsnull; } diff --git a/mozilla/layout/printing/nsPrintData.cpp b/mozilla/layout/printing/nsPrintData.cpp index 42759078009..8483819d5e7 100644 --- a/mozilla/layout/printing/nsPrintData.cpp +++ b/mozilla/layout/printing/nsPrintData.cpp @@ -139,7 +139,7 @@ nsPrintData::~nsPrintData() } if (mBrandName) { - nsCRT::free(mBrandName); + NS_Free(mBrandName); } for (PRInt32 i=0;i(\"%s\")\n", valueCStr); - nsCRT::free(valueCStr); + NS_Free(valueCStr); } else { PR_LogPrint diff --git a/mozilla/rdf/base/src/nsRDFContentSink.cpp b/mozilla/rdf/base/src/nsRDFContentSink.cpp index 68052209115..1d9a4c8c8c2 100644 --- a/mozilla/rdf/base/src/nsRDFContentSink.cpp +++ b/mozilla/rdf/base/src/nsRDFContentSink.cpp @@ -510,7 +510,7 @@ RDFContentSinkImpl::HandleEndElement(const PRUnichar *aName) ("rdfxml: extra close tag '%s' at line %d", tagCStr, 0/*XXX fix me */); - nsCRT::free(tagCStr); + NS_Free(tagCStr); } #endif diff --git a/mozilla/security/manager/ssl/src/nsCrypto.cpp b/mozilla/security/manager/ssl/src/nsCrypto.cpp index b1658a949c5..98eceb64b0c 100644 --- a/mozilla/security/manager/ssl/src/nsCrypto.cpp +++ b/mozilla/security/manager/ssl/src/nsCrypto.cpp @@ -2044,10 +2044,10 @@ nsCrypto::ImportUserCertificates(const nsAString& aNickname, } aReturn.Assign(NS_ConvertASCIItoUTF16(retString)); if (nickname) { - nsCRT::free(nickname); + NS_Free(nickname); } if (cmmfResponse) { - nsCRT::free(cmmfResponse); + NS_Free(cmmfResponse); } if (certRepContent) { CMMF_DestroyCertRepContent(certRepContent); diff --git a/mozilla/widget/src/mac/nsClipboard.cpp b/mozilla/widget/src/mac/nsClipboard.cpp index 55e0f4cdb4b..e82d07250eb 100644 --- a/mozilla/widget/src/mac/nsClipboard.cpp +++ b/mozilla/widget/src/mac/nsClipboard.cpp @@ -317,7 +317,7 @@ nsClipboard :: SetNativeClipboardData ( PRInt32 aWhichClipboard ) const char* mapping = theMapper.ExportMapping(&mappingLen); if ( mapping && mappingLen ) { errCode = PutOnClipboard ( nsMimeMapperMac::MappingFlavor(), mapping, mappingLen ); - nsCRT::free ( NS_CONST_CAST(char*, mapping) ); + nsMemory::Free ( NS_CONST_CAST(char*, mapping) ); } return errCode; @@ -395,7 +395,7 @@ nsClipboard :: GetNativeClipboardData ( nsITransferable * aTransferable, PRInt32 errCode = GetDataOffClipboard ( nsMimeMapperMac::MappingFlavor(), (void**)&mimeMapperData, 0 ); nsMimeMapperMac theMapper ( mimeMapperData ); if (mimeMapperData) - nsCRT::free ( mimeMapperData ); + nsMemory::Free ( mimeMapperData ); // Now walk down the list of flavors. When we find one that is actually on the // clipboard, copy out the data into the transferable in that format. SetTransferData() diff --git a/mozilla/widget/src/mac/nsDragService.cpp b/mozilla/widget/src/mac/nsDragService.cpp index 511e67d2ad8..73f70555081 100644 --- a/mozilla/widget/src/mac/nsDragService.cpp +++ b/mozilla/widget/src/mac/nsDragService.cpp @@ -486,7 +486,7 @@ nsDragService::RegisterDragItemsAndFlavors(nsISupportsArray* inArray, RgnHandle if ( mapping && mappingLen ) { ::AddDragItemFlavor ( mDragRef, itemIndex, nsMimeMapperMac::MappingFlavor(), mapping, mappingLen, flags ); - nsCRT::free ( mapping ); + nsMemory::Free ( mapping ); ::SetDragItemBounds(mDragRef, itemIndex, &dragRgnBounds); } @@ -527,7 +527,7 @@ nsDragService::GetData ( nsITransferable * aTransferable, PRUint32 aItemIndex ) // create a mime mapper to help us out based on data in a special flavor for this item char* mappings = LookupMimeMappingsForItem(mDragRef, itemRef); nsMimeMapperMac theMapper ( mappings ); - nsCRT::free ( mappings ); + nsMemory::Free ( mappings ); // Now walk down the list of flavors. When we find one that is actually present, // copy out the data into the transferable in that format. SetTransferData() diff --git a/mozilla/widget/src/mac/nsMimeMapper.cpp b/mozilla/widget/src/mac/nsMimeMapper.cpp index c1f213251fb..d8780d5c6ea 100644 --- a/mozilla/widget/src/mac/nsMimeMapper.cpp +++ b/mozilla/widget/src/mac/nsMimeMapper.cpp @@ -289,7 +289,7 @@ nsMimeMapperMac::ExportMapping ( short * outLength ) const strcat(posInString, currMapping); posInString += strlen(currMapping); // advance marker to get ready for next mapping } - nsCRT::free ( mimeType ); + nsMemory::Free ( mimeType ); nsCRT::free ( currMapping ); } diff --git a/mozilla/xpfe/browser/src/nsBrowserInstance.cpp b/mozilla/xpfe/browser/src/nsBrowserInstance.cpp index da439f02358..3148e61c739 100644 --- a/mozilla/xpfe/browser/src/nsBrowserInstance.cpp +++ b/mozilla/xpfe/browser/src/nsBrowserInstance.cpp @@ -249,7 +249,7 @@ public: printf("########## PageCycler loaded (%d ms): %s\n", PR_IntervalToMilliseconds(PR_IntervalNow() - mIntervalTime), dataStr); - nsCRT::free(dataStr); + NS_Free(dataStr); nsAutoString url; rv = GetNextURL(url); @@ -283,7 +283,7 @@ public: else { char* dataStr = ToNewCString(data); printf("########## PageCycler possible failure for: %s\n", dataStr); - nsCRT::free(dataStr); + NS_Free(dataStr); } return rv; } diff --git a/mozilla/xpfe/components/bookmarks/src/nsBookmarksService.cpp b/mozilla/xpfe/components/bookmarks/src/nsBookmarksService.cpp index 64bb79a5dc3..7f81c3138af 100644 --- a/mozilla/xpfe/components/bookmarks/src/nsBookmarksService.cpp +++ b/mozilla/xpfe/components/bookmarks/src/nsBookmarksService.cpp @@ -1780,7 +1780,7 @@ nsBookmarksService::getLocaleString(const char *key, nsString &str) && (keyUni)) { str = keyUni; - nsCRT::free(keyUni); + NS_Free(keyUni); } else { @@ -5605,7 +5605,7 @@ nsBookmarksService::WriteBookmarksContainer(nsIRDFDataSource *ds, if (escapedAttrib) { rv |= strm->Write(escapedAttrib, strlen(escapedAttrib), &dummy); - nsCRT::free(escapedAttrib); + NS_Free(escapedAttrib); } } rv |= strm->Write(kCloseH3, sizeof(kCloseH3)-1, &dummy); @@ -5705,7 +5705,7 @@ nsBookmarksService::WriteBookmarksContainer(nsIRDFDataSource *ds, rv |= strm->Write(escapedAttrib, strlen(escapedAttrib), &dummy); - nsCRT::free(escapedAttrib); + NS_Free(escapedAttrib); escapedAttrib = nsnull; } } @@ -5884,7 +5884,7 @@ nsBookmarksService::WriteBookmarkProperties(nsIRDFDataSource *ds, rv |= strm->Write(escapedAttrib, strlen(escapedAttrib), &dummy); rv |= strm->Write(kNL, sizeof(kNL)-1, &dummy); - nsCRT::free(escapedAttrib); + NS_Free(escapedAttrib); escapedAttrib = nsnull; } } @@ -5895,7 +5895,7 @@ nsBookmarksService::WriteBookmarkProperties(nsIRDFDataSource *ds, rv |= strm->Write(attribute, strlen(attribute), &dummy); rv |= strm->Write(kQuoteStr, sizeof(kQuoteStr)-1, &dummy); } - nsCRT::free(attribute); + NS_Free(attribute); attribute = nsnull; } }