j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: blueswirl Date: Sat Jan 8 20:44:38 2011 New Revision: 1014 URL: http://tracker.coreboot.org/trac/openbios/changeset/1014
Log: Fix some memory leaks
Fix memory leaks reported by cppcheck: [../packages/pc-parts.c:291]: (error) Memory leak: parstr [../libopenbios/bootinfo_load.c:172]: (error) Memory leak: bootscript
Signed-off-by: Blue Swirl blauwirbel@gmail.com
Modified: trunk/openbios-devel/libopenbios/bootinfo_load.c trunk/openbios-devel/packages/pc-parts.c
Modified: trunk/openbios-devel/libopenbios/bootinfo_load.c ============================================================================== --- trunk/openbios-devel/libopenbios/bootinfo_load.c Sun Jan 2 10:56:19 2011 (r1013) +++ trunk/openbios-devel/libopenbios/bootinfo_load.c Sat Jan 8 20:44:38 2011 (r1014) @@ -169,6 +169,7 @@
if (!is_bootinfo(base)) { DPRINTF("Not a valid bootinfo memory image\n"); + free(bootscript); return; }
Modified: trunk/openbios-devel/packages/pc-parts.c ============================================================================== --- trunk/openbios-devel/packages/pc-parts.c Sun Jan 2 10:56:19 2011 (r1013) +++ trunk/openbios-devel/packages/pc-parts.c Sat Jan 8 20:44:38 2011 (r1014) @@ -131,6 +131,7 @@ }
DPRINTF("parstr: %s argstr: %s parnum: %d\n", parstr, argstr, parnum); + free(parstr);
if( parnum < 0 ) parnum = 0;