missed grub_free in icon_manager
PATCH 1/1 missed grub_free in icon_manager
Missed grub_free in gfxmenu/icon_manager.c
If I'm not mistaken, it should be there.
Signature · 4 lines
With best regards, _______________________________ Vladimir Testov, ROSA Laboratory. www.rosalab.ru
grub-core/gfxmenu/icon_manager.c +1 -0
@@ -213,6 +213,7 @@ icondir =grub_env_get ("icondir" );if (icondir) icon =try_loading_icon (mgr, icondir, class_name); +grub_free (icondir); }/* No icon was found. */
grub-core/gfxmenu/icon_manager.c line 216
Quoted 4 lines · Vladimir Testov
icondir = grub_env_get ("icondir"); if (icondir)grub-core/gfxmenu/icon_manager.c +1
-0icon =try_loading_icon (mgr, icondir, class_name); +grub_free (icondir);
grub_env_get doesn't give you a personal copy but the common one. You should not free it. In fact it should have been declared as returning const char *.
Quoted 11 lines · Vladimir 'φ-coder/phcoder' Serbinenko
grub-core/gfxmenu/icon_manager.c line 216
Quoted 4 lines · Vladimir Testov
icondir = grub_env_get ("icondir"); if (icondir)grub-core/gfxmenu/icon_manager.c +1
-0icon =try_loading_icon (mgr, icondir, class_name); +grub_free (icondir);
grub_env_getdoesn't give you a personal copy but the common one. You should not free it. In fact it should have been declared as returning const char *.
And actually it is. Did you disable warnings and/or -Werror? As this shouldn't even compile.