Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
5d5eb43f
Commit
5d5eb43f
authored
Jun 12, 2007
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix potential memleaks
parent
bd7d0c09
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
2 deletions
+21
-2
modules/misc/freetype.c
modules/misc/freetype.c
+21
-2
No files found.
modules/misc/freetype.c
View file @
5d5eb43f
...
...
@@ -295,6 +295,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"
);
...
...
@@ -861,9 +866,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
);
...
...
@@ -950,6 +955,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
)
...
...
@@ -1149,6 +1159,9 @@ static int PushFont( font_stack_t **p_font, const char *psz_name, int i_size,
return
VLC_EGENERIC
;
p_new
=
malloc
(
sizeof
(
font_stack_t
)
);
if
(
!
p_new
)
return
VLC_ENOMEM
;
p_new
->
p_next
=
NULL
;
if
(
psz_name
)
...
...
@@ -1279,6 +1292,12 @@ static uint32_t *IconvText( filter_t *p_filter, char *psz_string )
uint32_t
*
p_fribidi_string
;
p_fribidi_string
=
malloc
(
(
i_string_length
+
1
)
*
sizeof
(
uint32_t
)
);
if
(
!
p_fribidi_string
)
{
msg_Err
(
p_filter
,
"out of memory"
);
free
(
psz_unicode
);
return
NULL
;
}
/* Do bidi conversion line-by-line */
FriBidiCharType
base_dir
=
FRIBIDI_TYPE_LTR
;
...
...
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