diff options
author | Philippe De Swert <philippe.deswert@jollamobile.com> | 2014-05-27 10:42:39 (GMT) |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2014-06-12 16:44:58 (GMT) |
commit | 68e2b8882a735b9758e37cd760884d4a5f2e449a (patch) | |
tree | 402f00b5c35fa86edd7d75731da2f8905387e38f /src/eap_peer/tncc.c | |
parent | 5519241676ec182225cf11c44e42e974c490b3c7 (diff) | |
download | hostap-68e2b8882a735b9758e37cd760884d4a5f2e449a.zip hostap-68e2b8882a735b9758e37cd760884d4a5f2e449a.tar.gz hostap-68e2b8882a735b9758e37cd760884d4a5f2e449a.tar.bz2 |
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 <philippe.deswert@jollamobile.com>
Diffstat (limited to 'src/eap_peer/tncc.c')
-rw-r--r-- | src/eap_peer/tncc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/eap_peer/tncc.c b/src/eap_peer/tncc.c index 5b1a2d4..7ca956e 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; |