Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
6ba3ccfd
Commit
6ba3ccfd
authored
Jun 16, 2007
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix potential memleaks
parent
d4820d9c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
modules/misc/freetype.c
modules/misc/freetype.c
+13
-2
No files found.
modules/misc/freetype.c
View file @
6ba3ccfd
...
...
@@ -252,6 +252,11 @@ static int Create( vlc_object_t *p_this )
{
if
(
psz_fontfile
)
free
(
psz_fontfile
);
psz_fontfile
=
(
char
*
)
malloc
(
PATH_MAX
+
1
);
if
(
!
psz_fontfile
)
{
msg_Err
(
p_filter
,
"out of memory"
);
goto
error
;
}
#ifdef WIN32
GetWindowsDirectory
(
psz_fontfile
,
PATH_MAX
+
1
);
strcat
(
psz_fontfile
,
"
\\
fonts
\\
arial.ttf"
);
...
...
@@ -693,9 +698,9 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
subpicture_region_t
*
p_region_in
)
{
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
line_desc_t
*
p_lines
=
0
,
*
p_line
=
0
,
*
p_next
=
0
,
*
p_prev
=
0
;
line_desc_t
*
p_lines
=
NULL
,
*
p_line
=
NULL
,
*
p_next
=
NULL
,
*
p_prev
=
NULL
;
int
i
,
i_pen_y
,
i_pen_x
,
i_error
,
i_glyph_index
,
i_previous
;
uint32_t
*
psz_unicode
,
*
psz_unicode_orig
=
0
,
i_char
,
*
psz_line_start
;
uint32_t
*
psz_unicode
,
*
psz_unicode_orig
=
NULL
,
i_char
,
*
psz_line_start
;
int
i_string_length
;
char
*
psz_string
;
vlc_iconv_t
iconv_handle
=
(
vlc_iconv_t
)(
-
1
);
...
...
@@ -782,6 +787,11 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
int
start_pos
,
pos
=
0
;
p_fribidi_string
=
malloc
(
(
i_string_length
+
1
)
*
sizeof
(
uint32_t
)
);
if
(
!
p_fribidi_string
)
{
msg_Err
(
p_filter
,
"out of memory"
);
goto
error
;
}
/* Do bidi conversion line-by-line */
while
(
pos
<
i_string_length
)
...
...
@@ -1073,3 +1083,4 @@ static int SetFontSize( filter_t *p_filter, int i_size )
return
VLC_SUCCESS
;
}
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