diff options
Diffstat (limited to 'src/irmd/main.c')
-rw-r--r-- | src/irmd/main.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/irmd/main.c b/src/irmd/main.c index 435ee116..02ffb21b 100644 --- a/src/irmd/main.c +++ b/src/irmd/main.c @@ -392,21 +392,19 @@ static int bootstrap_ipcp(pid_t api, dif_config_msg_t * conf) return -1; } - entry->dif_name = strdup(conf->dif_name); - if (entry->dif_name == NULL) { + if (ipcp_bootstrap(entry->api, conf)) { pthread_rwlock_unlock(&irmd->reg_lock); pthread_rwlock_unlock(&irmd->state_lock); - LOG_ERR("Failed to strdup."); + LOG_ERR("Could not bootstrap IPCP."); return -1; } - if (ipcp_bootstrap(entry->api, conf)) { + entry->dif_name = strdup(conf->dif_name); + if (entry->dif_name == NULL) { pthread_rwlock_unlock(&irmd->reg_lock); pthread_rwlock_unlock(&irmd->state_lock); - LOG_ERR("Could not bootstrap IPCP."); - free(entry->dif_name); - entry->dif_name = NULL; - return -1; + LOG_WARN("Failed to set name of DIF."); + return -ENOMEM; } pthread_rwlock_unlock(&irmd->reg_lock); |