From cf2cc375020a2cd5038332f923d428c8e642b70a Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Tue, 12 Mar 2019 16:05:23 +0100 Subject: [PATCH] alsactl: simple coverity fix Signed-off-by: Jaroslav Kysela --- alsactl/init_parse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/alsactl/init_parse.c b/alsactl/init_parse.c index f39d80e..562e674 100644 --- a/alsactl/init_parse.c +++ b/alsactl/init_parse.c @@ -1675,8 +1675,10 @@ static int parse(struct space *space, const char *filename) linenum = 0; linesize = 128; line = malloc(linesize); - if (line == NULL) + if (line == NULL) { + file_unmap(buf, bufsize); return -ENOMEM; + } space->filename = filename; while (!err && pos < bufsize && !space->quit) { count = line_width(buf, bufsize, pos); -- 2.47.1