[MERGED] osmo-trx[master]: Configuration: Variables allocated with 'new' must be freed ...

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Tom Tsou gerrit-no-reply at lists.osmocom.org
Tue May 30 19:19:19 UTC 2017


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 <Alexander.Chemeris at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Tom Tsou <tom at tsou.cc>



More information about the gerrit-log mailing list