Configuration: Variables allocated with 'new' must be freed with 'delete'.
Thank you Valgrind.
Change-Id: I8477e4e37282947f9841cee9002565631ca0c0b6
diff --git a/CommonLibs/Configuration.cpp b/CommonLibs/Configuration.cpp
index 7ca193b..14e5400 100644
--- a/CommonLibs/Configuration.cpp
+++ b/CommonLibs/Configuration.cpp
@@ -113,7 +113,7 @@
"Maximum number of alarms to remember inside the application."
);
mSchema[tmp->getName()] = *tmp;
- free(tmp);
+ delete tmp;
tmp = new ConfigurationKey("Log.File","",
"",
@@ -127,7 +127,7 @@
"To disable again, execute \"unconfig Log.File\"."
);
mSchema[tmp->getName()] = *tmp;
- free(tmp);
+ delete tmp;
tmp = new ConfigurationKey("Log.Level","NOTICE",
"",
@@ -145,7 +145,7 @@
"Default logging level when no other level is defined for a file."
);
mSchema[tmp->getName()] = *tmp;
- free(tmp);
+ delete tmp;
// Add application specific schema
mSchema.insert(wSchema.begin(), wSchema.end());