The memory allocated by the 'grub_parser_split_cmdline()' is leaked.
Hello, all.
Please see line 204 and 209 on the 'grub-1.95/kern/parser.c'.
This code allocates memory. it stores arguments.
-begin----------------------------------------------------------------------
---------
/* Reserve memory for the return values. */
args = grub_malloc (bp - buffer);
if (! args)
return grub_errno;
grub_memcpy (args, buffer, bp - buffer);
*argv = grub_malloc (sizeof (char *) * (*argc + 1)); if (! *argv)
{
grub_free (args);
return grub_errno;
}-end------------------------------------------------------------------------
---------
And this code is called from 'grub_normal_do_completion ()' and 'grub_enter_rescue_mode ()'. But I cannot find the codes release its memory. Maybe leaks it.
Signature · 1 line
Hitoshi Ozeki [email protected]
Quoted 3 lines · Hitoshi Ozeki
And this code is called from '
grub_normal_do_completion()' and 'grub_enter_rescue_mode()'. But I cannot find the codes release its memory. Maybe leaks it.
Fixed. Thank you.
Okuji