normal: fix memory leak
Found by: Coverity scan. CID: 96677
This commit is contained in:
parent
e7e05cae8d
commit
152695d0fa
1 changed files with 4 additions and 1 deletions
|
@ -64,7 +64,10 @@ grub_env_new_context (int export_all)
|
|||
return grub_errno;
|
||||
menu = grub_zalloc (sizeof (*menu));
|
||||
if (! menu)
|
||||
{
|
||||
grub_free (context);
|
||||
return grub_errno;
|
||||
}
|
||||
|
||||
context->prev = grub_current_context;
|
||||
grub_current_context = context;
|
||||
|
|
Loading…
Reference in a new issue