Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
8d50bb67
Commit
8d50bb67
authored
Mar 27, 2012
by
Huw Davies
Committed by
Alexandre Julliard
Mar 27, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add a helper to free a face object and fix a potential memory leak.
parent
b5115f77
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
freetype.c
dlls/gdi32/freetype.c
+10
-4
No files found.
dlls/gdi32/freetype.c
View file @
8d50bb67
...
...
@@ -1668,6 +1668,15 @@ static inline void get_fontsig( FT_Face ft_face, FONTSIGNATURE *fs )
}
}
static
inline
void
free_face
(
Face
*
face
)
{
HeapFree
(
GetProcessHeap
(),
0
,
face
->
file
);
HeapFree
(
GetProcessHeap
(),
0
,
face
->
StyleName
);
HeapFree
(
GetProcessHeap
(),
0
,
face
->
FullName
);
HeapFree
(
GetProcessHeap
(),
0
,
face
->
cached_enum_data
);
HeapFree
(
GetProcessHeap
(),
0
,
face
);
}
#define ADDFONT_EXTERNAL_FONT 0x01
#define ADDFONT_FORCE_BITMAP 0x02
#define ADDFONT_ADD_TO_CACHE 0x04
...
...
@@ -1709,10 +1718,7 @@ static void AddFaceToList(FT_Face ft_face, const char *file, void *font_data_ptr
}
else
{
TRACE
(
"Replacing original with this one
\n
"
);
list_remove
(
&
face
->
entry
);
HeapFree
(
GetProcessHeap
(),
0
,
face
->
file
);
HeapFree
(
GetProcessHeap
(),
0
,
face
->
StyleName
);
HeapFree
(
GetProcessHeap
(),
0
,
face
->
FullName
);
HeapFree
(
GetProcessHeap
(),
0
,
face
);
free_face
(
face
);
break
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment