8000 Sanitizer fixes by QuLogic · Pull Request #9239 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Sanitizer fixes #9239

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 28, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix leak of FreeType glyphs.
Resizing the glyph vector simply drops the pointers, but does not free
them. The clear() method does all of this work as well as resetting the
pen location.
  • Loading branch information
QuLogic committed Sep 27, 2017
commit 35203741931697ef874a262e44247f92264fdc1a
4 changes: 1 addition & 3 deletions src/ft2font.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -601,9 +601,7 @@ void FT2Font::set_text(
FT_Bool use_kerning = FT_HAS_KERNING(face);
FT_UInt previous = 0;

glyphs.resize(0);
pen.x = 0;
pen.y = 0;
clear();
Copy link
Contributor
@anntzer anntzer Sep 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for the future reviewer: this additionally calls FT_Done_Glyph on each element of glyph.
This parts looks good to me.


bbox.xMin = bbox.yMin = 32000;
bbox.xMax = bbox.yMax = -32000;
Expand Down
0