diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2020-09-25 09:32:01 +0700 |
---|---|---|
committer | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2020-09-25 09:32:01 +0700 |
commit | 6e725279cac716a304386515e78566d748e3c6e9 (patch) | |
tree | faba811949c87e3dde1c1424f2c8f69f7eebc9d8 | |
parent | 0c7e9354fe2e23d0314aadefc8ea3f195057494f (diff) |
vty: cosmetic: use osmo_talloc_replace_string()
Change-Id: Ic195cef2aafec55d37152045f7714335ded0a62b
-rw-r--r-- | src/common/vty.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/common/vty.c b/src/common/vty.c index 36b0eaf3..dd83a111 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -637,13 +637,9 @@ DEFUN(cfg_bts_pcu_sock, cfg_bts_pcu_sock_cmd, { struct gsm_bts *bts = vty->index; - if (bts->pcu.sock_path) { - /* FIXME: close the interface? */ - talloc_free(bts->pcu.sock_path); - } - bts->pcu.sock_path = talloc_strdup(bts, argv[0]); - /* FIXME: re-open the interface? */ + osmo_talloc_replace_string(bts, &bts->pcu.sock_path, argv[0]); + /* FIXME: re-open the interface? */ return CMD_SUCCESS; } |