From 64a22d4ee2dfc755842afbc5f94720c52b0ce9b2 Mon Sep 17 00:00:00 2001 From: "bruce%cybersight.com" Date: Fri, 3 Sep 1999 14:08:47 +0000 Subject: [PATCH] Use nsCRT::free() instead of delete[] for char* data. --- gfx/src/gtk/nsDeviceContextGTK.cpp | 3 ++- widget/src/xpwidgets/nsXIFFormatConverter.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gfx/src/gtk/nsDeviceContextGTK.cpp b/gfx/src/gtk/nsDeviceContextGTK.cpp index 3fa0bf38a848..b21769a86e91 100644 --- a/gfx/src/gtk/nsDeviceContextGTK.cpp +++ b/gfx/src/gtk/nsDeviceContextGTK.cpp @@ -22,6 +22,7 @@ #include "nsIPref.h" #include "nsIServiceManager.h" #include "il_util.h" +#include "nsCRT.h" #include "nsDeviceContextGTK.h" #include "nsGfxCIID.h" @@ -361,7 +362,7 @@ NS_IMETHODIMP nsDeviceContextGTK::CheckFontExistence(const nsString& aFontName) PR_snprintf(wildstring, namelen + 200, "-*-%s-*-*-normal-*-*-*-%d-%d-*-*-*-*", fontName, dpi, dpi); - delete [] fontName; + nsCRT::free(fontName); fnames = ::XListFontsWithInfo(GDK_DISPLAY(), wildstring, 1, &numnames, &fonts); diff --git a/widget/src/xpwidgets/nsXIFFormatConverter.cpp b/widget/src/xpwidgets/nsXIFFormatConverter.cpp index 2328ce3d622c..76211836cf0f 100644 --- a/widget/src/xpwidgets/nsXIFFormatConverter.cpp +++ b/widget/src/xpwidgets/nsXIFFormatConverter.cpp @@ -240,7 +240,7 @@ nsXIFFormatConverter::Convert(const char *aFromDataFlavor, nsISupports *aFromDat *aToData = genericDataWrapper; NS_ADDREF(*aToData); *aDataToLen = outStr.Length(); - delete [] holderBecauseNSStringIsLame; + nsCRT::free(holderBecauseNSStringIsLame); } } } // if plain text