* grub-core/disk/loopback.c (grub_cmd_loopback): Fix a memory leak
when replacing an existing device.
This commit is contained in:
parent
cfed2ad097
commit
186ae367af
2 changed files with 5 additions and 4 deletions
|
@ -97,10 +97,6 @@ grub_cmd_loopback (grub_extcmd_context_t ctxt, int argc, char **args)
|
|||
|
||||
if (newdev)
|
||||
{
|
||||
char *newname = grub_strdup (args[1]);
|
||||
if (! newname)
|
||||
goto fail;
|
||||
|
||||
grub_file_close (newdev->file);
|
||||
newdev->file = file;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue