зеркало из https://github.com/mozilla/pjs.git
Use delete[] for strings allocated with ToNewCString().
This commit is contained in:
Родитель
ba9bd482be
Коммит
17dca257b7
|
@ -1676,7 +1676,7 @@ NS_BASE int fputs(const nsString2& aString, FILE* out)
|
|||
if(len>0)
|
||||
::fwrite(cp, 1, len, out);
|
||||
if (cp != buf) {
|
||||
delete cp;
|
||||
delete[] cp;
|
||||
}
|
||||
return (int) len;
|
||||
}
|
||||
|
|
|
@ -1676,7 +1676,7 @@ NS_BASE int fputs(const nsString2& aString, FILE* out)
|
|||
if(len>0)
|
||||
::fwrite(cp, 1, len, out);
|
||||
if (cp != buf) {
|
||||
delete cp;
|
||||
delete[] cp;
|
||||
}
|
||||
return (int) len;
|
||||
}
|
||||
|
|
|
@ -1676,7 +1676,7 @@ NS_BASE int fputs(const nsString2& aString, FILE* out)
|
|||
if(len>0)
|
||||
::fwrite(cp, 1, len, out);
|
||||
if (cp != buf) {
|
||||
delete cp;
|
||||
delete[] cp;
|
||||
}
|
||||
return (int) len;
|
||||
}
|
||||
|
|
|
@ -1676,7 +1676,7 @@ NS_BASE int fputs(const nsString2& aString, FILE* out)
|
|||
if(len>0)
|
||||
::fwrite(cp, 1, len, out);
|
||||
if (cp != buf) {
|
||||
delete cp;
|
||||
delete[] cp;
|
||||
}
|
||||
return (int) len;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче