aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-05-22 19:50:39 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-05-22 19:50:39 +0200
commit9d8aeab0b6887f8384834bf912262be1906253c6 (patch)
tree7d61c78f5ed613b1e1d925d455f6b2d0a4c5be8a
parent44980347f308fe5bbe48a933dbc81b82b53d310a (diff)
sysmobts: Avoid memleak when multiple -c arguments are passed
Rely on optarg pointing to an address that will be valid for the run of the entire application. Fixes: CID 1206578
-rw-r--r--src/osmo-bts-sysmo/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/osmo-bts-sysmo/main.c b/src/osmo-bts-sysmo/main.c
index 797f1741..81f6474c 100644
--- a/src/osmo-bts-sysmo/main.c
+++ b/src/osmo-bts-sysmo/main.c
@@ -222,7 +222,7 @@ static void handle_options(int argc, char **argv)
daemonize = 1;
break;
case 'c':
- config_file = strdup(optarg);
+ config_file = optarg;
break;
case 'T':
log_set_print_timestamp(osmo_stderr_target, 1);