bugunrtf - Bugs: bug #44598, Memory leaks in various functions

 
 

bug #44598: Memory leaks in various functions

Submitted by:  Hanno Boeck <hanno>
Submitted on:  Sun 22 Mar 2015 05:13:33 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedPrivacy: Public
Assigned to: Jean-Francois Dockes <medoc>Open/Closed: Closed
Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 24 Mar 2015 06:36:12 PM UTC, comment #1:

I just pushed commits which should fix all leaks I could find which are related to rtf data. There are 2 remaining constant lost blocks during initialization (48 bytes). I don't think that these are worth the trouble chasing.

Jean-Francois Dockes <medoc>
Project AdministratorIn charge of this item.
Sun 22 Mar 2015 05:13:33 AM UTC, original submission:

unrtf has many memory allocations that aren't properly free'd.

Here is an example output when running unrtf with valgrind on accents.rtf from the tests directory:

valgrind --leak-check=full -q unrtf accents.rtf

[...]
==6629== 10 bytes in 1 blocks are definitely lost in loss record 6 of 27
==6629== at 0x4C29F80: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==6629== by 0x408B88: my_malloc (malloc.c:73)
==6629== by 0x409C64: read_word (parse.c:261)
==6629== by 0x409C64: word_read (parse.c:448)
==6629== by 0x401645: main (main.c:258)
==6629==
==6629== 20 bytes in 2 blocks are definitely lost in loss record 8 of 27
==6629== at 0x4C29F80: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==6629== by 0x408B88: my_malloc (malloc.c:73)
==6629== by 0x409C64: read_word (parse.c:261)
==6629== by 0x409C64: word_read (parse.c:448)
==6629== by 0x409DCA: word_read (parse.c:460)
==6629== by 0x401645: main (main.c:258)
==6629==
==6629== 32 bytes in 2 blocks are definitely lost in loss record 11 of 27
==6629== at 0x4C29F80: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==6629== by 0x408B88: my_malloc (malloc.c:73)
==6629== by 0x40A85A: give_definition (user.c:118)
==6629== by 0x40BB39: match_name (user.c:235)
==6629== by 0x40BC90: user_init (user.c:283)
==6629== by 0x408B1E: get_config (main.c:127)
==6629== by 0x401AB1: main (main.c:213)
==6629==

Hanno Boeck <hanno>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by medoc (Posted a comment)
  • -unavailable- added by hanno (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 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 24 Mar 2015 06:36:12 PM UTCmedocStatusNone=>Fixed
      Assigned toNone=>medoc
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1