* util/grub-mkimagexx.c (make_reloc_section): Fix memory leak.

(load_image): Likewise.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2013-10-19 02:39:06 +02:00
parent 6f65237374
commit 663f6eb195
2 changed files with 16 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2013-10-19 Vladimir Serbinenko <phcoder@gmail.com>
* util/grub-mkimagexx.c (make_reloc_section): Fix memory leak.
(load_image): Likewise.
2013-10-19 Vladimir Serbinenko <phcoder@gmail.com>
* util/grub-render-label.c: Move backend part to ...

View File

@ -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;
}