* util/grub-mkimage.c (main): Postpone freeing arguments.output
until after its use in generate_image.
This commit is contained in:
parent
6a0debbd91
commit
c821711f69
2 changed files with 8 additions and 1 deletions
|
@ -1905,7 +1905,6 @@ main (int argc, char *argv[])
|
|||
if (! fp)
|
||||
grub_util_error (_("cannot open `%s': %s"), arguments.output,
|
||||
strerror (errno));
|
||||
free (arguments.output);
|
||||
}
|
||||
|
||||
if (!arguments.dir)
|
||||
|
@ -1933,5 +1932,8 @@ main (int argc, char *argv[])
|
|||
if (arguments.dir)
|
||||
free (arguments.dir);
|
||||
|
||||
if (arguments.output)
|
||||
free (arguments.output);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue