Fix EAP-TNC peer memory leak on an error path

This commit is contained in:
Ryuji 2009-06-30 19:39:13 +03:00 committed by Jouni Malinen
parent 064bb8232c
commit 1c5a1aa51c

View file

@ -1106,6 +1106,7 @@ static struct tnc_if_imc * tncc_parse_imc(char *start, char *end, int *error)
if (pos >= end || *pos != ' ') { if (pos >= end || *pos != ' ') {
wpa_printf(MSG_ERROR, "TNC: Ignoring invalid IMC line '%s' " wpa_printf(MSG_ERROR, "TNC: Ignoring invalid IMC line '%s' "
"(no space after name)", start); "(no space after name)", start);
os_free(imc->name);
os_free(imc); os_free(imc);
return NULL; return NULL;
} }