memory leak fixed in case od duplicate fields
This commit is contained in:
@@ -105,6 +105,7 @@ Structure::Structure (String fieldName,
|
||||
if(result==0) {
|
||||
String message("duplicate fieldName ");
|
||||
message += name;
|
||||
delete[] fields;
|
||||
throw std::invalid_argument(message);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user