summaryrefslogtreecommitdiff
path: root/src/ipcpd/broadcast/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipcpd/broadcast/main.c')
-rw-r--r--src/ipcpd/broadcast/main.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/ipcpd/broadcast/main.c b/src/ipcpd/broadcast/main.c
index 2b8b90a5..d0becc63 100644
--- a/src/ipcpd/broadcast/main.c
+++ b/src/ipcpd/broadcast/main.c
@@ -56,36 +56,24 @@ struct ipcp ipcpi;
static int initialize_components(const struct ipcp_config * conf)
{
- ipcpi.layer_name = strdup(conf->layer_info.layer_name);
- if (ipcpi.layer_name == NULL) {
- log_err("Failed to set layer name.");
- goto fail_layer_name;
- }
-
+ strcpy(ipcpi.layer_name, conf->layer_info.layer_name);
ipcpi.dir_hash_algo = conf->layer_info.dir_hash_algo;
assert(ipcp_dir_hash_len() != 0);
if (dt_init()) {
log_err("Failed to initialize forwarding component.");
- goto fail_dt;
+ return -1;
}
ipcp_set_state(IPCP_INIT);
return 0;
-
- fail_dt:
- free(ipcpi.layer_name);
- fail_layer_name:
- return -1;
}
static void finalize_components(void)
{
dt_fini();
-
- free(ipcpi.layer_name);
}
static int start_components(void)