PVS V611: Use delete [] for memory allocated by new [].
Change-Id: I712350ae7f742aaa8e0ea58186265fac4bbac73e Reviewed-on: https://review.haiku-os.org/c/1627 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
ff38df48cf
commit
e081b9cd7e
@@ -23,7 +23,7 @@ public:
|
|||||||
|
|
||||||
~PCL6Rasterizer()
|
~PCL6Rasterizer()
|
||||||
{
|
{
|
||||||
delete fOutBuffer;
|
delete[] fOutBuffer;
|
||||||
fOutBuffer = NULL;
|
fOutBuffer = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ Err::SetTo(const std::string &msg, const ssize_t pos) {
|
|||||||
|
|
||||||
void
|
void
|
||||||
Err::Unset() {
|
Err::Unset() {
|
||||||
delete fMsg;
|
delete[] fMsg;
|
||||||
fMsg = NULL;
|
fMsg = NULL;
|
||||||
fPos = -1;
|
fPos = -1;
|
||||||
}
|
}
|
||||||
@@ -80,7 +80,7 @@ Err::Pos() const {
|
|||||||
void
|
void
|
||||||
Err::SetMsg(const char *msg) {
|
Err::SetMsg(const char *msg) {
|
||||||
if (fMsg) {
|
if (fMsg) {
|
||||||
delete fMsg;
|
delete[] fMsg;
|
||||||
fMsg = NULL;
|
fMsg = NULL;
|
||||||
}
|
}
|
||||||
if (msg) {
|
if (msg) {
|
||||||
|
|||||||
@@ -3077,8 +3077,8 @@ vm_page_write_modified_page_range(struct VMCache* cache, uint32 firstPage,
|
|||||||
= new(malloc_flags(allocationFlags)) PageWriteWrapper*[maxPages];
|
= new(malloc_flags(allocationFlags)) PageWriteWrapper*[maxPages];
|
||||||
if (wrapperPool == NULL || wrappers == NULL) {
|
if (wrapperPool == NULL || wrappers == NULL) {
|
||||||
// don't fail, just limit our capabilities
|
// don't fail, just limit our capabilities
|
||||||
free(wrapperPool);
|
delete[] wrapperPool;
|
||||||
free(wrappers);
|
delete[] wrappers;
|
||||||
wrapperPool = stackWrappersPool;
|
wrapperPool = stackWrappersPool;
|
||||||
wrappers = stackWrappers;
|
wrappers = stackWrappers;
|
||||||
maxPages = 1;
|
maxPages = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user