bugGNU GRUB - Bugs: bug #35674, [PATCH] grub_normal_free_menu()...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #35674: [PATCH] grub_normal_free_menu() has a memory leak

Submitted by:  Andreas Vogel <anvoit>
Submitted on:  Thu 01 Mar 2012 12:30:22 AM UTC  
 
Category: NoneSeverity: Major
Priority: 5 - NormalItem Group: None
Status: FixedPrivacy: Public
Assigned to: NoneOriginator Name: Andreas Vogel
Open/Closed: ClosedRelease: 
Release: Bazaar - trunkReproducibility: None
Planned Release: None

Sun 04 Mar 2012 11:44:33 PM UTC, comment #3:

Patch needed several adjustments though.

Vladimir Serbinenko <phcoder>
Project Administrator
Sat 03 Mar 2012 08:08:31 PM UTC, comment #2:

I'll have to check that the proposed patch can't lead to the use of freed memory or double free.

Vladimir Serbinenko <phcoder>
Project Administrator
Fri 02 Mar 2012 02:28:24 PM UTC, comment #1:

Please find attached an updated version of the patch which fixes the memory leak when calling grub_normal_free_menu().

The variables title, users and sourcecode in the struct grub_menu_entry are defined as 'const char *' but are in fact variables holding dynamically allocated memory.

I forgot to include this correction in my first patch.

Andreas

(file #25245)

Andreas Vogel <anvoit>
Thu 01 Mar 2012 12:30:22 AM UTC, original submission:

The function grub_normal_free_menu() defined in normal/main.c doesn't free all memory of a menu entry.

The attached patch corrects this.

Regards,

Andreas

Andreas Vogel <anvoit>

 

Attached Files
file #25245:  grub-bzr_free-menu-memory-leak_v2.patch added by anvoit (2KiB - application/octet-stream)
file #25223:  grub-bzr_free-menu-memory-leak.patch added by anvoit (859B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by phcoder (Posted a comment)
  • -unavailable- added by anvoit (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 04 Mar 2012 11:44:33 PM UTCphcoderStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Fri 02 Mar 2012 02:28:24 PM UTCanvoitAttached File-=>Added grub-bzr_free-menu-memory-leak_v2.patch, #25245
    Thu 01 Mar 2012 12:30:22 AM UTCanvoitAttached File-=>Added grub-bzr_free-menu-memory-leak.patch, #25223

    Back to the top


    Powered by Savane 3.1-cleanup1