On 07.03.2013 09:53, Vladimir Testov wrote: > icondir = grub_env_get ("icondir"); > if (icondir) > icon = 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 *.