summaryrefslogtreecommitdiff
path: root/src/ipcpd/ipcp.c
diff options
context:
space:
mode:
authordimitri staessens <[email protected]>2017-01-29 13:17:33 +0100
committerdimitri staessens <[email protected]>2017-01-29 13:23:38 +0100
commit1f94baea43c031c366decb9c772514a89a7fa372 (patch)
tree14c3f3aa49f62706d5bcf7cd5e87698956a9a599 /src/ipcpd/ipcp.c
parentcfc1e421cd222f41dd1c8498d631a31c680e4211 (diff)
downloadouroboros-1f94baea43c031c366decb9c772514a89a7fa372.tar.gz
ouroboros-1f94baea43c031c366decb9c772514a89a7fa372.zip
ipcpd: Don't strdup() the dif_name in main loop
Diffstat (limited to 'src/ipcpd/ipcp.c')
-rw-r--r--src/ipcpd/ipcp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/ipcpd/ipcp.c b/src/ipcpd/ipcp.c
index a94e268d..2c3beed7 100644
--- a/src/ipcpd/ipcp.c
+++ b/src/ipcpd/ipcp.c
@@ -110,7 +110,7 @@ static void * ipcp_main_loop(void * o)
}
conf_msg = msg->conf;
conf.type = conf_msg->ipcp_type;
- conf.dif_name = strdup(conf_msg->dif_name);
+ conf.dif_name = conf_msg->dif_name;
if (conf.dif_name == NULL) {
ret_msg.has_result = true;
ret_msg.result = -1;
@@ -139,8 +139,6 @@ static void * ipcp_main_loop(void * o)
ret_msg.has_result = true;
ret_msg.result = ipcpi.ops->ipcp_bootstrap(&conf);
- if (ret_msg.result < 0)
- free(conf.dif_name);
break;
case IPCP_MSG_CODE__IPCP_ENROLL:
if (ipcpi.ops->ipcp_enroll == NULL) {