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
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue