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

Submitter:  Andreas Vogel <anvoit>
Submitted:  Thu 01 Mar 2012 12:30:22 AM UTC
   
 
Category:  None Severity:  Major
Priority:  5 - Normal Item Group:  None
Status:  Fixed Privacy:  Public
Assigned to:  None Originator Name:  Andreas Vogel
Open/Closed:  Closed Release:  Bazaar - trunk
Release:  Reproducibility:  None
Planned Release:  None

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

Patch needed several adjustments though.

Vladimir Serbinenko <phcoder>
Group 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>
Group 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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

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
  • -email is unavailable- added by phcoder (Posted a comment)
  • -email is unavailable- added by anvoit (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-03-04 phcoder StatusNone Fixed
        Open/ClosedOpen Closed
    2012-03-02 anvoit Attached File- Added grub-bzr_free-menu-memory-leak_v2.patch, #25245
    2012-03-01 anvoit Attached File- Added grub-bzr_free-menu-memory-leak.patch, #25223

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code