mirror of
https://github.com/openharmony/third_party_alsa-utils.git
synced 2026-07-19 20:43:35 -04:00
alsactl: init - parse() - fix possible double free
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
@@ -1701,6 +1701,7 @@ static int parse(struct space *space, const char *filename)
|
||||
|
||||
if (count > linesize - 1) {
|
||||
free(line);
|
||||
line = NULL;
|
||||
linesize = (count + 127 + 1) & ~127;
|
||||
if (linesize > 2048) {
|
||||
error("file %s, line %i too long", filename, linenum);
|
||||
|
||||
Reference in New Issue
Block a user