Use nsCRT::free() instead of delete[] for char* data.
git-svn-id: svn://10.0.0.236/trunk@45886 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
2a6864c0c9
commit
de50afc8c5
@ -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);
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user