alsactl: init - parse() - fix possible double free

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2021-01-08 18:18:53 +01:00
parent e55534d8a5
commit c5ecfd9789

View file

@ -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);