grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

The memory allocated by the 'grub_parser_split_cmdline()' is leaked.


From: Hitoshi Ozeki
Subject: The memory allocated by the 'grub_parser_split_cmdline()' is leaked.
Date: Tue, 10 Apr 2007 21:46:17 +0900

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.

-- 
 Hitoshi Ozeki address@hidden






reply via email to

[Prev in Thread] Current Thread [Next in Thread]