Fix few memory errors

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-03-16 23:03:08 +01:00
parent 7c464a1ec5
commit eaa1f9a64b
3 changed files with 13 additions and 8 deletions

View file

@ -63,10 +63,10 @@ grub_font_draw_string (const char *str, grub_font_t font,
if (!glyph)
return grub_errno;
err = grub_font_draw_glyph (glyph, color, x, baseline_y);
x += glyph->device_width;
grub_free (glyph);
if (err)
return err;
x += glyph->device_width;
}
grub_free (visual);