freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Git][freetype/freetype][master] [type42] Fix new memory leak.


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype][master] [type42] Fix new memory leak.
Date: Sun, 13 Jun 2021 02:34:24 +0000

Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType

Commits:

2 changed files:

Changes:

  • ChangeLog
    1
    +2021-06-12  Alexei Podtelezhnikov  <apodtele@gmail.com>
    
    2
    +
    
    3
    +	[type42] Fix new memory leak.
    
    4
    +
    
    5
    +	We need to inverse inheritance of FT_GlyphSlot_Internal so that we
    
    6
    +	have a chance to free the rendered bitmap from the parent slot.
    
    7
    +
    
    8
    +	* src/type42/t42objs.c (T42_GlyphSlot_Init): Remove the internal parts
    
    9
    +	of the child `ttslot' and replace it with the parent structure.
    
    10
    +	(T42_GlyphSlot_Done): Updated accordingly.
    
    11
    +
    
    1 12
     2021-06-12  Werner Lemberg  <wl@gnu.org>
    
    2 13
     
    
    3 14
     	[psaux] Fix another assertion.
    

  • src/type42/t42objs.c
    ... ... @@ -600,9 +600,9 @@
    600 600
         }
    
    601 601
     
    
    602 602
         /* share the loader so that the autohinter can see it */
    
    603
    -    FT_GlyphLoader_Done( t42slot->internal->loader );
    
    604
    -    FT_FREE( t42slot->internal );
    
    605
    -    t42slot->internal = slot->ttslot->internal;
    
    603
    +    FT_GlyphLoader_Done( slot->ttslot->internal->loader );
    
    604
    +    FT_FREE( slot->ttslot->internal );
    
    605
    +    slot->ttslot->internal = t42slot->internal;
    
    606 606
     
    
    607 607
         return error;
    
    608 608
       }
    
    ... ... @@ -614,8 +614,8 @@
    614 614
         T42_GlyphSlot  slot = (T42_GlyphSlot)t42slot;
    
    615 615
     
    
    616 616
     
    
    617
    +    slot->ttslot->internal = NULL;
    
    617 618
         FT_Done_GlyphSlot( slot->ttslot );
    
    618
    -    t42slot->internal = NULL;
    
    619 619
       }
    
    620 620
     
    
    621 621
     
    


  • reply via email to

    [Prev in Thread] Current Thread [Next in Thread]