mkimage: Fix memory leak.
This commit is contained in:
parent
43b444e593
commit
377c121170
1 changed files with 6 additions and 0 deletions
|
@ -240,6 +240,7 @@ main (int argc, char *argv[])
|
|||
{
|
||||
FILE *fp = stdout;
|
||||
struct arguments arguments;
|
||||
unsigned i;
|
||||
|
||||
grub_util_host_init (&argc, &argv);
|
||||
|
||||
|
@ -304,7 +305,12 @@ main (int argc, char *argv[])
|
|||
grub_util_file_sync (fp);
|
||||
fclose (fp);
|
||||
|
||||
for (i = 0; i < arguments.nmodules; i++)
|
||||
free (arguments.modules[i]);
|
||||
|
||||
free (arguments.dir);
|
||||
free (arguments.prefix);
|
||||
free (arguments.modules);
|
||||
|
||||
if (arguments.output)
|
||||
free (arguments.output);
|
||||
|
|
Loading…
Reference in a new issue