tools: ublimage: Fix memory leak in parse_cfg_file()
Dynamic memory, referenced by 'line', is allocated at ublimage.c:159 by calling function 'getline' and lost at ublimage.c:184. Signed-off-by: Maks Mishin <maks.mishinFZ@gmail.com>
This commit is contained in:
@@ -178,6 +178,7 @@ static uint32_t parse_cfg_file(struct ubl_header *ublhdr, char *name)
|
|||||||
lineno, fld, &dcd_len);
|
lineno, fld, &dcd_len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
free(line);
|
||||||
fclose(fd);
|
fclose(fd);
|
||||||
|
|
||||||
return dcd_len;
|
return dcd_len;
|
||||||
|
Reference in New Issue
Block a user