Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
5294faf6
Commit
5294faf6
authored
May 01, 2011
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
freetype: fix memory leaks.
parent
2c649fb4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
modules/misc/text_renderer/freetype.c
modules/misc/text_renderer/freetype.c
+10
-1
No files found.
modules/misc/text_renderer/freetype.c
View file @
5294faf6
...
@@ -384,7 +384,7 @@ static int Create( vlc_object_t *p_this )
...
@@ -384,7 +384,7 @@ static int Create( vlc_object_t *p_this )
/* If nothing is found, use the default family */
/* If nothing is found, use the default family */
if
(
!
psz_fontfile
)
if
(
!
psz_fontfile
)
psz_fontfile
=
psz_fontfamily
;
psz_fontfile
=
strdup
(
psz_fontfamily
)
;
#else
/* !HAVE_STYLES */
#else
/* !HAVE_STYLES */
/* Use the default file */
/* Use the default file */
...
@@ -414,6 +414,9 @@ static int Create( vlc_object_t *p_this )
...
@@ -414,6 +414,9 @@ static int Create( vlc_object_t *p_this )
psz_fontfile
?
psz_fontfile
:
"(null)"
);
psz_fontfile
?
psz_fontfile
:
"(null)"
);
goto
error
;
goto
error
;
}
}
#ifdef HAVE_STYLES
free
(
psz_fontfile
);
#endif
i_error
=
FT_Select_Charmap
(
p_sys
->
p_face
,
ft_encoding_unicode
);
i_error
=
FT_Select_Charmap
(
p_sys
->
p_face
,
ft_encoding_unicode
);
if
(
i_error
)
if
(
i_error
)
...
@@ -444,6 +447,9 @@ static int Create( vlc_object_t *p_this )
...
@@ -444,6 +447,9 @@ static int Create( vlc_object_t *p_this )
error:
error:
if
(
p_sys
->
p_face
)
FT_Done_Face
(
p_sys
->
p_face
);
if
(
p_sys
->
p_face
)
FT_Done_Face
(
p_sys
->
p_face
);
if
(
p_sys
->
p_library
)
FT_Done_FreeType
(
p_sys
->
p_library
);
if
(
p_sys
->
p_library
)
FT_Done_FreeType
(
p_sys
->
p_library
);
#ifdef HAVE_STYLES
free
(
psz_fontfile
);
#endif
free
(
psz_fontfamily
);
free
(
psz_fontfamily
);
free
(
p_sys
);
free
(
p_sys
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
...
@@ -2371,7 +2377,10 @@ static char* FontConfig_Select( FcConfig* config, const char* family,
...
@@ -2371,7 +2377,10 @@ static char* FontConfig_Select( FcConfig* config, const char* family,
{
{
char
*
psz_fontsize
;
char
*
psz_fontsize
;
if
(
asprintf
(
&
psz_fontsize
,
"%d"
,
i_size
)
!=
-
1
)
if
(
asprintf
(
&
psz_fontsize
,
"%d"
,
i_size
)
!=
-
1
)
{
FcPatternAddString
(
pat
,
FC_SIZE
,
(
const
FcChar8
*
)
psz_fontsize
);
FcPatternAddString
(
pat
,
FC_SIZE
,
(
const
FcChar8
*
)
psz_fontsize
);
free
(
psz_fontsize
);
}
}
}
/* */
/* */
...
...
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