Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
589f9281
Commit
589f9281
authored
Dec 05, 2017
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
subsdec: Fix memory leak
parent
834c0a0b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
modules/codec/subsdec.c
modules/codec/subsdec.c
+3
-1
No files found.
modules/codec/subsdec.c
View file @
589f9281
...
...
@@ -678,7 +678,7 @@ static text_style_t* DuplicateAndPushStyle(style_stack_t** pp_stack)
style_stack_t
*
p_entry
=
malloc
(
sizeof
(
*
p_entry
)
);
if
(
unlikely
(
!
p_entry
)
)
{
fre
e
(
p_dup
);
text_style_Delet
e
(
p_dup
);
return
NULL
;
}
// Give the style ownership to the segment.
...
...
@@ -792,12 +792,14 @@ static text_segment_t* ParseSubtitles( int *pi_align, const char *psz_subtitle )
}
if
(
!
strcasecmp
(
psz_attribute_name
,
"face"
)
)
{
free
(
p_segment
->
style
->
psz_fontname
);
p_segment
->
style
->
psz_fontname
=
psz_attribute_value
;
// We don't want to free the attribute value since it has become our fontname
psz_attribute_value
=
NULL
;
}
else
if
(
!
strcasecmp
(
psz_attribute_name
,
"family"
)
)
{
free
(
p_segment
->
style
->
psz_monofontname
);
p_segment
->
style
->
psz_monofontname
=
psz_attribute_value
;
psz_attribute_value
=
NULL
;
}
...
...
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