2010-02-24 Vladimir Serbinenko <phcoder@gmail.com>

* normal/crypto.c (read_crypto_list): Fix a memory leak.
	* normal/term.c (read_terminal_list): Likewise.
	* normal/main.c (grub_normal_init_page): Likewise.
	(grub_normal_read_line_real): Likewise.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-02-24 15:24:21 +01:00
parent 607ffde2ca
commit 4a8a763c7b
4 changed files with 13 additions and 0 deletions

View file

@ -1,3 +1,10 @@
2010-02-24 Vladimir Serbinenko <phcoder@gmail.com>
* normal/crypto.c (read_crypto_list): Fix a memory leak.
* normal/term.c (read_terminal_list): Likewise.
* normal/main.c (grub_normal_init_page): Likewise.
(grub_normal_read_line_real): Likewise.
2010-02-24 Vladimir Serbinenko <phcoder@gmail.com> 2010-02-24 Vladimir Serbinenko <phcoder@gmail.com>
* loader/i386/multiboot_mbi.c (grub_multiboot_set_bootdev): Fix a * loader/i386/multiboot_mbi.c (grub_multiboot_set_bootdev): Fix a

View file

@ -88,6 +88,7 @@ read_crypto_list (void)
} }
file = grub_file_open (filename); file = grub_file_open (filename);
grub_free (filename);
if (!file) if (!file)
{ {
grub_errno = GRUB_ERR_NONE; grub_errno = GRUB_ERR_NONE;

View file

@ -418,6 +418,7 @@ grub_normal_init_page (struct grub_term_output *term)
msg_len = grub_utf8_to_ucs4_alloc (msg_formatted, msg_len = grub_utf8_to_ucs4_alloc (msg_formatted,
&unicode_msg, &last_position); &unicode_msg, &last_position);
grub_free (msg_formatted);
if (msg_len < 0) if (msg_len < 0)
{ {
@ -582,10 +583,13 @@ grub_normal_read_line_real (char **line, int cont, int nested)
if (cont || nested) if (cont || nested)
{ {
grub_free (*line); grub_free (*line);
grub_free (prompt);
*line = 0; *line = 0;
return grub_errno; return grub_errno;
} }
} }
grub_free (prompt);
return 0; return 0;
} }

View file

@ -175,6 +175,7 @@ read_terminal_list (void)
} }
file = grub_file_open (filename); file = grub_file_open (filename);
grub_free (filename);
if (!file) if (!file)
{ {
grub_errno = GRUB_ERR_NONE; grub_errno = GRUB_ERR_NONE;