From: Philippe De Swert Date: Tue, 27 May 2014 10:42:39 +0000 (+0300) Subject: TNC: Fix minor memory leak (CID 62848) X-Git-Tag: hostap_2_3~328 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68e2b8882a735b9758e37cd760884d4a5f2e449a;p=thirdparty%2Fhostap.git TNC: Fix minor memory leak (CID 62848) In tncc_read_config(), the memory allocted for the config did not get freed if an error occured. Signed-off-by: Philippe De Swert --- 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;