mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-10 03:55:41 +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;
|
linenum = 0;
|
||||||
linesize = 128;
|
linesize = 128;
|
||||||
line = malloc(linesize);
|
line = malloc(linesize);
|
||||||
if (line == NULL)
|
if (line == NULL) {
|
||||||
|
file_unmap(buf, bufsize);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
}
|
||||||
space->filename = filename;
|
space->filename = filename;
|
||||||
while (!err && pos < bufsize && !space->quit) {
|
while (!err && pos < bufsize && !space->quit) {
|
||||||
count = line_width(buf, bufsize, pos);
|
count = line_width(buf, bufsize, pos);
|
||||||
|
|
Loading…
Reference in a new issue