mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-28 01:59:49 +00:00
* util/grub-mkimagexx.c (make_reloc_section): Fix memory leak.
(load_image): Likewise.
This commit is contained in:
1 parent
6f65237374
commit
663f6eb195
2 files changed
+16
No files matched your search
@@ -749,6 +749,14 @@ SUFFIX (make_reloc_section) (Elf_Ehdr *e, void **out,
|
||||
assert ((current_address + (grub_uint8_t *) *out) == ptr);
|
||||
}
|
||||
|
||||
for (lst = lst0; lst; )
|
||||
{
|
||||
struct fixup_block_list *next;
|
||||
next = lst->next;
|
||||
free (lst);
|
||||
lst = next;
|
||||
}
|
||||
|
||||
return current_address;
|
||||
}
|
||||
|
||||
@@ -1065,6 +1073,9 @@ SUFFIX (load_image) (const char *kernel_path, size_t *exec_size,
|
||||
}
|
||||
free (kernel_img);
|
||||
|
||||
free (section_vaddresses);
|
||||
free (section_addresses);
|
||||
|
||||
return out_img;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user