mirror of
https://git.proxmox.com/git/grub2
synced 2025-07-27 10:08:18 +00:00
linux/getroot: fix memory leak.
Found by: Coverity scan.
This commit is contained in:
parent
5e27fb06f2
commit
e61f4eba18
@ -621,7 +621,10 @@ grub_util_pull_lvm_by_command (const char *os_dev)
|
|||||||
free (vgname);
|
free (vgname);
|
||||||
|
|
||||||
if (!pid)
|
if (!pid)
|
||||||
return;
|
{
|
||||||
|
free (vgid);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* Parent. Read vgs' output. */
|
/* Parent. Read vgs' output. */
|
||||||
vgs = fdopen (fd, "r");
|
vgs = fdopen (fd, "r");
|
||||||
@ -653,6 +656,7 @@ out:
|
|||||||
close (fd);
|
close (fd);
|
||||||
waitpid (pid, NULL, 0);
|
waitpid (pid, NULL, 0);
|
||||||
free (buf);
|
free (buf);
|
||||||
|
free (vgid);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ZFS has similar problems to those of btrfs (see above). */
|
/* ZFS has similar problems to those of btrfs (see above). */
|
||||||
|
Loading…
Reference in New Issue
Block a user