diff options
author | Martin Willi <martin@revosec.ch> | 2011-04-21 10:48:16 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2011-04-21 10:48:16 +0200 |
commit | 3e2419ebe32de72d824864eb2e0e677a7c197af1 (patch) | |
tree | 2ee06332c69629a83bdca2de75daa057174535ef /src/libcharon/plugins/eap_tnc/eap_tnc.c | |
parent | 17ce69b47a1efd6234960cf7d1f50712aee61db5 (diff) | |
download | strongswan-3e2419ebe32de72d824864eb2e0e677a7c197af1.tar.bz2 strongswan-3e2419ebe32de72d824864eb2e0e677a7c197af1.tar.xz |
Use thread save settings alloc_str function where appropriate
Diffstat (limited to 'src/libcharon/plugins/eap_tnc/eap_tnc.c')
-rw-r--r-- | src/libcharon/plugins/eap_tnc/eap_tnc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libcharon/plugins/eap_tnc/eap_tnc.c b/src/libcharon/plugins/eap_tnc/eap_tnc.c index d47fd379e..85628340d 100644 --- a/src/libcharon/plugins/eap_tnc/eap_tnc.c +++ b/src/libcharon/plugins/eap_tnc/eap_tnc.c @@ -40,7 +40,7 @@ struct private_eap_tnc_t { /** Maximum number of EAP-TNC messages/fragments allowed */ -#define MAX_MESSAGE_COUNT 10 +#define MAX_MESSAGE_COUNT 10 /** Default size of a EAP-TNC fragment */ #define MAX_FRAGMENT_LEN 50000 @@ -149,7 +149,7 @@ static eap_tnc_t *eap_tnc_create(identification_t *server, "charon.plugins.eap-tnc.fragment_size", MAX_FRAGMENT_LEN); max_msg_count = lib->settings->get_int(lib->settings, "charon.plugins.eap-tnc.max_message_count", MAX_MESSAGE_COUNT); - protocol = lib->settings->get_str(lib->settings, + protocol = lib->settings->alloc_str(lib->settings, "charon.plugins.eap-tnc.protocol", "tnccs-1.1"); if (strcaseeq(protocol, "tnccs-2.0")) { @@ -166,9 +166,11 @@ static eap_tnc_t *eap_tnc_create(identification_t *server, else { DBG1(DBG_TNC, "TNCCS protocol '%s' not supported", protocol); + free(protocol); free(this); return NULL; } + free(protocol); tnccs = charon->tnccs->create_instance(charon->tnccs, type, is_server); this->tls_eap = tls_eap_create(EAP_TNC, (tls_t*)tnccs, frag_size, max_msg_count); if (!this->tls_eap) |