gfxmenu: fix memory leak
Found by: Coverity scan. CID: 96657
This commit is contained in:
parent
dbb0f9fa4f
commit
a4b1326f0d
1 changed files with 4 additions and 4 deletions
|
@ -63,14 +63,14 @@ grub_gfxmenu_try (int entry, grub_menu_t menu, int nested)
|
||||||
return grub_error (GRUB_ERR_FILE_NOT_FOUND, N_("variable `%s' isn't set"),
|
return grub_error (GRUB_ERR_FILE_NOT_FOUND, N_("variable `%s' isn't set"),
|
||||||
"theme");
|
"theme");
|
||||||
|
|
||||||
instance = grub_zalloc (sizeof (*instance));
|
|
||||||
if (!instance)
|
|
||||||
return grub_errno;
|
|
||||||
|
|
||||||
err = grub_video_get_info (&mode_info);
|
err = grub_video_get_info (&mode_info);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
instance = grub_zalloc (sizeof (*instance));
|
||||||
|
if (!instance)
|
||||||
|
return grub_errno;
|
||||||
|
|
||||||
if (theme_path[0] != '/' && theme_path[0] != '(')
|
if (theme_path[0] != '/' && theme_path[0] != '(')
|
||||||
{
|
{
|
||||||
const char *prefix;
|
const char *prefix;
|
||||||
|
|
Loading…
Reference in a new issue