* [PATCH] missed grub_free in icon_manager
@ 2013-03-07 8:53 Vladimir Testov
2013-03-07 9:05 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 1 reply; 4+ messages in thread
From: Vladimir Testov @ 2013-03-07 8:53 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 189 bytes --]
Missed grub_free in gfxmenu/icon_manager.c
If I'm not mistaken, it should be there.
--
With best regards,
_______________________________
Vladimir Testov, ROSA Laboratory.
www.rosalab.ru
[-- Attachment #2: grub-2.00-missed-grub-free.patch --]
[-- Type: text/x-patch, Size: 463 bytes --]
diff -Naur grub-2.00/grub-core/gfxmenu/icon_manager.c grub-new/grub-core/gfxmenu/icon_manager.c
--- grub-2.00/grub-core/gfxmenu/icon_manager.c 2012-02-08 16:41:41.000000000 +0400
+++ grub-new/grub-core/gfxmenu/icon_manager.c 2013-03-07 12:50:15.805798204 +0400
@@ -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. */
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] missed grub_free in icon_manager
2013-03-07 8:53 [PATCH] missed grub_free in icon_manager Vladimir Testov
@ 2013-03-07 9:05 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-03-07 9:07 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 1 reply; 4+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2013-03-07 9:05 UTC (permalink / raw)
To: The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 364 bytes --]
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 *.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] missed grub_free in icon_manager
2013-03-07 9:05 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2013-03-07 9:07 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 0 replies; 4+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2013-03-07 9:07 UTC (permalink / raw)
To: The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 551 bytes --]
On 07.03.2013 10:05, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> 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 *.
>
And actually it is. Did you disable warnings and/or -Werror? As this
shouldn't even compile.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] missed grub_free in icon_manager
@ 2013-03-07 10:32 Vladimir Testov
0 siblings, 0 replies; 4+ messages in thread
From: Vladimir Testov @ 2013-03-07 10:32 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 229 bytes --]
>And actually it is. Did you disable warnings and/or -Werror? As this
>shouldn't even compile.
Sorry for wasting your time...
--
With best regards,
_______________________________
Vladimir Testov, ROSA Laboratory.
www.rosalab.ru
[-- Attachment #2: Type: text/html, Size: 1868 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-03-07 10:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-07 8:53 [PATCH] missed grub_free in icon_manager Vladimir Testov
2013-03-07 9:05 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-03-07 9:07 ` Vladimir 'φ-coder/phcoder' Serbinenko
-- strict thread matches above, loose matches on Subject: below --
2013-03-07 10:32 Vladimir Testov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).