mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-05 18:16:23 +03:00
0022931: Wrong delete operator in Message_Msg.cxx / Message_PrinterOStream.cxx
This commit is contained in:
parent
f78c0415f7
commit
06ddeafb65
@ -157,7 +157,7 @@ Message_Msg& Message_Msg::Arg (const Standard_CString theString)
|
||||
char * sStringBuffer = new char [Max (strlen(theString)+1, 1024)];
|
||||
sprintf (sStringBuffer, aFormat.ToCString(), theString);
|
||||
TCollection_ExtendedString aStr ( sStringBuffer );
|
||||
delete sStringBuffer;
|
||||
delete [] sStringBuffer;
|
||||
sStringBuffer = 0;
|
||||
|
||||
// replace the format placeholder by the actual string
|
||||
|
@ -122,7 +122,8 @@ void Message_PrinterOStream::Send (const TCollection_ExtendedString &theString,
|
||||
char* astr = new char[theString.LengthOfCString()+1];
|
||||
theString.ToUTF8CString (astr);
|
||||
Send ( astr, theGravity, putEndl );
|
||||
delete astr;
|
||||
delete [] astr;
|
||||
astr = 0;
|
||||
}
|
||||
else {
|
||||
TCollection_AsciiString aStr ( theString, '?' );
|
||||
|
Loading…
x
Reference in New Issue
Block a user