Fix several memory leaks.
This commit is contained in:
parent
c686014c1b
commit
03f7c8c304
13 changed files with 72 additions and 14 deletions
|
@ -517,7 +517,15 @@ destroy_screen (struct screen *screen)
|
|||
struct line *linep = screen->lines + i;
|
||||
|
||||
if (linep)
|
||||
grub_free (linep->buf);
|
||||
{
|
||||
unsigned j;
|
||||
if (linep->pos)
|
||||
for (j = 0; j < screen->nterms; j++)
|
||||
grub_free (linep->pos[j]);
|
||||
|
||||
grub_free (linep->buf);
|
||||
grub_free (linep->pos);
|
||||
}
|
||||
}
|
||||
|
||||
grub_free (screen->killed_text);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue