dtinfo: Fix coverity warning related to using delete not delete []

This commit is contained in:
Peter Howkins
2018-04-23 02:20:23 +01:00
parent 22071fd62a
commit 2f634848ce
38 changed files with 75 additions and 75 deletions

View File

@@ -134,7 +134,7 @@ Boolean ostring::expand(const int new_alloc_sz, Boolean pre_zero)
if ( v_p ) {
memcpy(new_p, v_p, v_sz);
delete v_p;
delete [] v_p;
}
v_p = new_p;

View File

@@ -54,7 +54,7 @@ public:
ostring(const int chunk_size);
ostring(char* str, const int str_sz = -1); // -1 means take strlen(str)
ostring(const ostring&);
virtual ~ostring() { delete v_p; };
virtual ~ostring() { delete [] v_p; };
// length of the string
int size() const { return v_sz; };

View File

@@ -53,5 +53,5 @@ void randomize::restore(buffer& scrambled)
char_swap(buf[i], buf[pos[i]]);
}
delete pos;
delete [] pos;
}

View File

@@ -234,7 +234,7 @@ Boolean write_lock(char* lock_file_path,
if ( ok == true ) {
delete ai_info;
delete [] ai_info;
/////////////////////////////////////////
// create the access info file
/////////////////////////////////////////