mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
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>
This commit is contained in:
parent
5519241676
commit
68e2b8882a
@ -1092,8 +1092,10 @@ static int tncc_read_config(struct tncc_data *tncc)
|
|||||||
int error = 0;
|
int error = 0;
|
||||||
|
|
||||||
imc = tncc_parse_imc(pos + 4, line_end, &error);
|
imc = tncc_parse_imc(pos + 4, line_end, &error);
|
||||||
if (error)
|
if (error) {
|
||||||
|
os_free(config);
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
if (imc) {
|
if (imc) {
|
||||||
if (last == NULL)
|
if (last == NULL)
|
||||||
tncc->imc = imc;
|
tncc->imc = imc;
|
||||||
|
Loading…
Reference in New Issue
Block a user