* grub-core/normal/autofs.c (read_fs_list): Fix memory leak.
This commit is contained in:
parent
5ed554f014
commit
f0a53ed2c2
2 changed files with 15 additions and 4 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2012-05-01 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/normal/autofs.c (read_fs_list): Fix memory leak.
|
||||||
|
|
||||||
2012-05-01 Vladimir Serbinenko <phcoder@gmail.com>
|
2012-05-01 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
Handle RAIDZ on non-512B sectors.
|
Handle RAIDZ on non-512B sectors.
|
||||||
|
|
|
@ -104,13 +104,20 @@ read_fs_list (const char *prefix)
|
||||||
|
|
||||||
/* If the line is empty, skip it. */
|
/* If the line is empty, skip it. */
|
||||||
if (p >= q)
|
if (p >= q)
|
||||||
continue;
|
{
|
||||||
|
grub_free (buf);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
fs_mod = grub_malloc (sizeof (*fs_mod));
|
fs_mod = grub_malloc_notrack (sizeof (*fs_mod));
|
||||||
if (! fs_mod)
|
if (! fs_mod)
|
||||||
continue;
|
{
|
||||||
|
grub_free (buf);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
fs_mod->name = grub_strdup (p);
|
fs_mod->name = grub_strdup_notrack (p);
|
||||||
|
grub_free (buf);
|
||||||
if (! fs_mod->name)
|
if (! fs_mod->name)
|
||||||
{
|
{
|
||||||
grub_free (fs_mod);
|
grub_free (fs_mod);
|
||||||
|
|
Loading…
Reference in a new issue