memory leak fixed in case od duplicate fields

This commit is contained in:
Matej Sekoranja
2011-05-18 10:45:54 +02:00
parent 49e619200e
commit 8a34a9e52a
2 changed files with 2 additions and 1 deletions

View File

@@ -105,6 +105,7 @@ Structure::Structure (String fieldName,
if(result==0) {
String message("duplicate fieldName ");
message += name;
delete[] fields;
throw std::invalid_argument(message);
}
}