mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-12-22 22:06:31 +01:00
alsactl: simple coverity fix
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
a558b71e63
commit
cf2cc37502
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue