PVS V611: Use delete [] for memory allocated by new [].

Change-Id: I712350ae7f742aaa8e0ea58186265fac4bbac73e
Reviewed-on: https://review.haiku-os.org/c/1627
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
Murai Takashi 2019-07-18 06:26:14 +09:00 committed by waddlesplash
parent ff38df48cf
commit e081b9cd7e
3 changed files with 5 additions and 5 deletions

View File

@ -23,7 +23,7 @@ public:
~PCL6Rasterizer()
{
delete fOutBuffer;
delete[] fOutBuffer;
fOutBuffer = NULL;
}

View File

@ -62,7 +62,7 @@ Err::SetTo(const std::string &msg, const ssize_t pos) {
void
Err::Unset() {
delete fMsg;
delete[] fMsg;
fMsg = NULL;
fPos = -1;
}
@ -80,7 +80,7 @@ Err::Pos() const {
void
Err::SetMsg(const char *msg) {
if (fMsg) {
delete fMsg;
delete[] fMsg;
fMsg = NULL;
}
if (msg) {

View File

@ -3077,8 +3077,8 @@ vm_page_write_modified_page_range(struct VMCache* cache, uint32 firstPage,
= new(malloc_flags(allocationFlags)) PageWriteWrapper*[maxPages];
if (wrapperPool == NULL || wrappers == NULL) {
// don't fail, just limit our capabilities
free(wrapperPool);
free(wrappers);
delete[] wrapperPool;
delete[] wrappers;
wrapperPool = stackWrappersPool;
wrappers = stackWrappers;
maxPages = 1;