mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 06:49:35 +00:00
linux/getroot: fix memory leak.
Found by: Coverity scan.
This commit is contained in:
1 parent
5e27fb06f2
commit
e61f4eba18
1 file changed
+4
@@ -621,7 +621,10 @@ grub_util_pull_lvm_by_command (const char *os_dev)
|
||||
free (vgname);
|
||||
|
||||
if (!pid)
|
||||
{
|
||||
free (vgid);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Parent. Read vgs' output. */
|
||||
vgs = fdopen (fd, "r");
|
||||
@@ -653,6 +656,7 @@ out:
|
||||
close (fd);
|
||||
waitpid (pid, NULL, 0);
|
||||
free (buf);
|
||||
free (vgid);
|
||||
}
|
||||
|
||||
/* ZFS has similar problems to those of btrfs (see above). */
|
||||
|
||||
Reference in new issue
Block a user