aboutsummaryrefslogtreecommitdiff
path: root/src/espik_config.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/espik_config.c')
-rw-r--r--src/espik_config.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/espik_config.c b/src/espik_config.c
index b8f7f71..234954a 100644
--- a/src/espik_config.c
+++ b/src/espik_config.c
@@ -21,9 +21,10 @@ t_servinfo* espik_server_config_set (char* server, unsigned short port)
s_info = malloc (sizeof (t_servinfo));
- s_info->host = server;
+ s_info->host = strdup (server);
s_info->port = port;
+ espik_free (server);
espik_leave();
return (s_info);
}
@@ -107,8 +108,6 @@ void espik_config_init ()
void espik_config_shutdown (t_info s_info)
{
- espik_free (s_info.server->host);
-// free (s_info->server->port);
espik_free (s_info.server);
espik_free (s_info.client);
// free (s_info);