Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
303e9b54
Commit
303e9b54
authored
Aug 03, 2008
by
ivoire
Browse files
Fix memleak and bad use of a const variable.
parent
9f151876
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/misc/filter_chain.c
View file @
303e9b54
...
...
@@ -214,10 +214,11 @@ static int filter_chain_AppendFromStringInternal( filter_chain_t *p_chain,
{
config_chain_t
*
p_cfg
=
NULL
;
char
*
psz_name
=
NULL
;
char
*
psz_new_string
;
if
(
!
psz_string
||
!*
psz_string
)
return
0
;
psz_string
=
config_ChainCreate
(
&
psz_name
,
&
p_cfg
,
psz_string
);
psz_
new_
string
=
config_ChainCreate
(
&
psz_name
,
&
p_cfg
,
psz_string
);
filter_t
*
p_filter
=
filter_chain_AppendFilterInternal
(
p_chain
,
psz_name
,
p_cfg
,
NULL
,
NULL
);
...
...
@@ -227,11 +228,13 @@ static int filter_chain_AppendFromStringInternal( filter_chain_t *p_chain,
"to filter chain"
,
psz_name
);
free
(
psz_name
);
free
(
p_cfg
);
free
(
psz_new_string
);
return
-
1
;
}
free
(
psz_name
);
int
ret
=
filter_chain_AppendFromStringInternal
(
p_chain
,
psz_string
);
int
ret
=
filter_chain_AppendFromStringInternal
(
p_chain
,
psz_new_string
);
free
(
psz_new_string
);
if
(
ret
<
0
)
{
filter_chain_DeleteFilterInternal
(
p_chain
,
p_filter
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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