Fix a memory leak
This commit is contained in:
parent
c97dbbf2f2
commit
c2aa00f059
1 changed files with 2 additions and 4 deletions
|
@ -688,11 +688,9 @@ grub_dl_load_file (const char *filename)
|
|||
grub_file_close (file);
|
||||
|
||||
mod = grub_dl_load_core (core, size);
|
||||
grub_free (core);
|
||||
if (! mod)
|
||||
{
|
||||
grub_free (core);
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
|
||||
mod->ref_count--;
|
||||
return mod;
|
||||
|
|
Loading…
Reference in a new issue