Tom Tsou has submitted this change and it was merged.

Change subject: Configuration: Variables allocated with 'new' must be freed 
with 'delete'.
......................................................................


Configuration: Variables allocated with 'new' must be freed with 'delete'.

Thank you Valgrind.

Change-Id: I8477e4e37282947f9841cee9002565631ca0c0b6
---
M CommonLibs/Configuration.cpp
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Tom Tsou: Looks good to me, approved
  Harald Welte: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



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());

-- 
To view, visit https://gerrit.osmocom.org/2761
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8477e4e37282947f9841cee9002565631ca0c0b6
Gerrit-PatchSet: 2
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Alexander Chemeris <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Tom Tsou <[email protected]>

Reply via email to