Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType
Commits:
-
8336d53c
by Alexei Podtelezhnikov at 2021-06-12T22:33:08-04:00
2 changed files:
Changes:
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.
|
... | ... | @@ -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 |
|