summaryrefslogtreecommitdiff
path: root/src/ipcpd/ipcp.c
diff options
context:
space:
mode:
authordimitri staessens <[email protected]>2017-02-03 20:38:39 +0100
committerdimitri staessens <[email protected]>2017-02-03 20:50:48 +0100
commita30e244407655d16429ef442ac23db43a548bf95 (patch)
tree3a47f2b2db895173a1e3605df3fbdc925b7b127b /src/ipcpd/ipcp.c
parent29fe780c782b74f516a47521297848095a8f5ede (diff)
downloadouroboros-a30e244407655d16429ef442ac23db43a548bf95.tar.gz
ouroboros-a30e244407655d16429ef442ac23db43a548bf95.zip
ipcpd: Remove strdup() from ipcp main loop
Diffstat (limited to 'src/ipcpd/ipcp.c')
-rw-r--r--src/ipcpd/ipcp.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/ipcpd/ipcp.c b/src/ipcpd/ipcp.c
index 2c3beed7..2115f7c1 100644
--- a/src/ipcpd/ipcp.c
+++ b/src/ipcpd/ipcp.c
@@ -49,8 +49,6 @@ static void * ipcp_main_loop(void * o)
dif_config_msg_t * conf_msg;
struct dif_config conf;
- char * msg_name_dup;
-
struct timeval ltv = {(SOCKET_TIMEOUT / 1000),
(SOCKET_TIMEOUT % 1000) * 1000};
@@ -154,12 +152,9 @@ static void * ipcp_main_loop(void * o)
LOG_ERR("Ap_reg unsupported.");
break;
}
- msg_name_dup = strdup(msg->name);
ret_msg.has_result = true;
ret_msg.result =
- ipcpi.ops->ipcp_name_reg(msg_name_dup);
- if (ret_msg.result < 0)
- free(msg_name_dup);
+ ipcpi.ops->ipcp_name_reg(msg->name);
break;
case IPCP_MSG_CODE__IPCP_NAME_UNREG:
if (ipcpi.ops->ipcp_name_unreg == NULL) {