mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-08 17:08:35 +02:00
text-progress-bar: plug fd leak
This plugs a fd leak in an error path
This commit is contained in:
parent
9fffcda4c5
commit
bcb27226b7
1 changed files with 3 additions and 1 deletions
|
|
@ -106,8 +106,10 @@ get_os_string (void)
|
|||
if (fd == -1)
|
||||
return;
|
||||
|
||||
if (fstat (fd, &sbuf) == -1)
|
||||
if (fstat (fd, &sbuf) == -1) {
|
||||
close (fd);
|
||||
return;
|
||||
}
|
||||
|
||||
buf = calloc (sbuf.st_size + 1, sizeof(char));
|
||||
read (fd, buf, sbuf.st_size);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue