match new[] operator with delete[] operator
The string ends up being deleted with the [] variant later on. CID 602975.
This commit is contained in:
+1
-1
@@ -1168,7 +1168,7 @@ format_data(int32 type, char *ptr, long size)
|
|||||||
char *tempstr;
|
char *tempstr;
|
||||||
|
|
||||||
if (size <= 0L) {
|
if (size <= 0L) {
|
||||||
str = new char;
|
str = new char[1];
|
||||||
*str = 0;
|
*str = 0;
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user