From a30e244407655d16429ef442ac23db43a548bf95 Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Fri, 3 Feb 2017 20:38:39 +0100 Subject: ipcpd: Remove strdup() from ipcp main loop --- src/ipcpd/ipcp.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/ipcpd/ipcp.c') 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) { -- cgit v1.2.3