dtinfo: Fix coverity warning related to using delete not delete []
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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; };
|
||||
|
||||
@@ -53,5 +53,5 @@ void randomize::restore(buffer& scrambled)
|
||||
char_swap(buf[i], buf[pos[i]]);
|
||||
}
|
||||
|
||||
delete pos;
|
||||
delete [] pos;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
/////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user