* grub-core/kern/emu/hostdisk.c (find_system_device): Fix a memory leak.

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-11-12 23:42:49 +01:00
parent 91e5a33da5
commit 91ee7b6d73
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2011-11-12 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/kern/emu/hostdisk.c (find_system_device): Fix a memory leak.
2011-11-12 Vladimir Serbinenko <phcoder@gmail.com> 2011-11-12 Vladimir Serbinenko <phcoder@gmail.com>
* include/grub/lvm.h (grub_lvm_pv): Correct start type. * include/grub/lvm.h (grub_lvm_pv): Correct start type.

View file

@ -1751,7 +1751,10 @@ find_system_device (const char *os_dev, struct stat *st, int convert, int add)
} }
if (!add) if (!add)
return -1; {
free (os_disk);
return -1;
}
if (i == ARRAY_SIZE (map)) if (i == ARRAY_SIZE (map))
grub_util_error (_("device count exceeds limit")); grub_util_error (_("device count exceeds limit"));