From 1f94baea43c031c366decb9c772514a89a7fa372 Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Sun, 29 Jan 2017 13:17:33 +0100 Subject: ipcpd: Don't strdup() the dif_name in main loop --- src/ipcpd/ipcp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/ipcpd/ipcp.c') 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) { -- cgit v1.2.3