]> git.alsa-project.org Git - alsa-utils.git/commitdiff
alsactl: init - parse() - fix possible double free
authorJaroslav Kysela <perex@perex.cz>
Fri, 8 Jan 2021 17:18:53 +0000 (18:18 +0100)
committerJaroslav Kysela <perex@perex.cz>
Fri, 8 Jan 2021 17:18:53 +0000 (18:18 +0100)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
alsactl/init_parse.c

index 58b46f42de4bf9d2d206580800663c92dd5488a3..71348da3729c76170da24d5120ded362ac871228 100644 (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);