readSTLString() new/free mismatch fix

valgrind caught a problem where memory was allocated with "new[]" but
freed with "delete"; changed it to free with "delete[]".
develop
Matthew Cline 2011-07-11 02:06:38 -07:00
parent 4d406524c0
commit 5da4eb3344
1 changed files with 1 additions and 1 deletions

@ -195,7 +195,7 @@ const string NormalProcess::readSTLString (uint32_t offset)
char * temp = new char[header._M_length+1];
read(offset,header._M_length+1,(uint8_t * )temp);
string ret(temp);
delete temp;
delete[] temp;
return ret;
}