diff --git a/src/eap_peer/tncc.c b/src/eap_peer/tncc.c index 5b1a2d40e..7ca956e5b 100644 --- a/src/eap_peer/tncc.c +++ b/src/eap_peer/tncc.c @@ -1092,8 +1092,10 @@ static int tncc_read_config(struct tncc_data *tncc) int error = 0; imc = tncc_parse_imc(pos + 4, line_end, &error); - if (error) + if (error) { + os_free(config); return -1; + } if (imc) { if (last == NULL) tncc->imc = imc;