From a4f9a5ff9275535cccbb2c93a06a0042adebbeca Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Fri, 3 May 2013 14:02:49 +0200 Subject: [PATCH] * grub-core/gfxmenu/view.c (grub_gfxmenu_view_new): Clear grub_gfxmenu_timeout_notifications. (grub_gfxmenu_view_destroy): Likewise. --- ChangeLog | 6 ++++++ grub-core/gfxmenu/view.c | 15 +++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/ChangeLog b/ChangeLog index 9e99eb540..858f0b087 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2013-05-03 Vladimir Serbinenko + + * grub-core/gfxmenu/view.c (grub_gfxmenu_view_new): Clear + grub_gfxmenu_timeout_notifications. + (grub_gfxmenu_view_destroy): Likewise. + 2013-05-03 Vladimir Serbinenko * grub-core/normal/term.c (print_ucs4_real): Fix startwidth in dry run. diff --git a/grub-core/gfxmenu/view.c b/grub-core/gfxmenu/view.c index 475fc76c5..bcf6399e2 100644 --- a/grub-core/gfxmenu/view.c +++ b/grub-core/gfxmenu/view.c @@ -58,6 +58,14 @@ grub_gfxmenu_view_new (const char *theme_path, if (! view) return 0; + while (grub_gfxmenu_timeout_notifications) + { + struct grub_gfxmenu_timeout_notify *p; + p = grub_gfxmenu_timeout_notifications; + grub_gfxmenu_timeout_notifications = grub_gfxmenu_timeout_notifications->next; + grub_free (p); + } + view->screen.x = 0; view->screen.y = 0; view->screen.width = width; @@ -105,6 +113,13 @@ grub_gfxmenu_view_destroy (grub_gfxmenu_view_t view) { if (!view) return; + while (grub_gfxmenu_timeout_notifications) + { + struct grub_gfxmenu_timeout_notify *p; + p = grub_gfxmenu_timeout_notifications; + grub_gfxmenu_timeout_notifications = grub_gfxmenu_timeout_notifications->next; + grub_free (p); + } grub_video_bitmap_destroy (view->desktop_image); if (view->terminal_box) view->terminal_box->destroy (view->terminal_box);