* commands/ls.c (grub_ls_list_files): Free pathname on exit.
+2010-02-06 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * commands/ls.c (grub_ls_list_files): Free pathname on exit.
+
2010-02-06 Vladimir Serbinenko <phcoder@gmail.com>
* fs/fat.c (grub_fat_iterate_dir): Free unibuf at exit.
int print_files_long (const char *filename,
const struct grub_dirhook_info *info)
{
- char *pathname;
-
if ((! all) && (filename[0] == '.'))
return 0;
if (! info->dir)
{
grub_file_t file;
+ char *pathname;
if (dirname[grub_strlen (dirname) - 1] == '/')
pathname = grub_xasprintf ("%s%s", dirname, filename);
if (! file)
{
grub_errno = 0;
+ grub_free (pathname);
return 0;
}
}
grub_file_close (file);
+ grub_free (pathname);
}
else
grub_printf ("%-12s", "DIR");