xen: avoid memleaks on error
When loading a Xen pv-kernel avoid memory leaks in case of errors. Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
parent
4231927e44
commit
c69d1858f1
2 changed files with 14 additions and 7 deletions
|
@ -563,7 +563,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
|
|||
{
|
||||
err = grub_relocator_alloc_chunk_addr (relocator, &ch, max_addr, size);
|
||||
if (err)
|
||||
return err;
|
||||
goto fail;
|
||||
|
||||
if (grub_initrd_load (&initrd_ctx, argv,
|
||||
get_virtual_current_address (ch)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue