[openbsc 2/2] bsc_hack: Don't strdup the string arguments

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/OpenBSC@lists.osmocom.org/.

Daniel Willmann dwillmann at sysmocom.de
Wed May 21 13:46:44 UTC 2014


Fixes CIDs #1206577, #1206578
---
 openbsc/src/osmo-nitb/bsc_hack.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/openbsc/src/osmo-nitb/bsc_hack.c b/openbsc/src/osmo-nitb/bsc_hack.c
index 61141fd..3307bc6 100644
--- a/openbsc/src/osmo-nitb/bsc_hack.c
+++ b/openbsc/src/osmo-nitb/bsc_hack.c
@@ -148,10 +148,10 @@ static void handle_options(int argc, char **argv)
 			daemonize = 1;
 			break;
 		case 'l':
-			database_name = strdup(optarg);
+			database_name = optarg;
 			break;
 		case 'c':
-			config_file = strdup(optarg);
+			config_file = optarg;
 			break;
 		case 'p':
 			create_pcap_file(optarg);
-- 
1.8.4.2





More information about the OpenBSC mailing list