The output filename is currently free()d before the call to generate_image(),
which takes this as a parameter.
This patch delays the free until after generate_image returns.
=== modified file 'util/grub-mkimage.c'
--- util/grub-mkimage.c 2012-06-26 01:38:10 +0000
+++ util/grub-mkimage.c 2012-10-22 12:13:38 +0000
@@ -1862,7 +1862,6 @@
if (! fp)
grub_util_error (_("cannot open `%s': %s"), arguments.output,
strerror (errno));
- free (arguments.output);
}
if (!arguments.dir)
@@ -1889,5 +1888,8 @@
if (arguments.dir)
free (arguments.dir);
+ if (arguments.output)
+ free (arguments.output);
+
return 0;
}
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel