Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
285b706b
Commit
285b706b
authored
Oct 09, 2012
by
Janne Grunau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter: fix graphparser memleaks on error paths
Fixes CID700635, CID700636 and CID732274.
parent
587874ef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
graphparser.c
libavfilter/graphparser.c
+15
-9
No files found.
libavfilter/graphparser.c
View file @
285b706b
...
...
@@ -238,10 +238,11 @@ static int link_filter_inouts(AVFilterContext *filt_ctx,
return
AVERROR
(
ENOMEM
);
if
(
p
->
filter_ctx
)
{
if
((
ret
=
link_filter
(
p
->
filter_ctx
,
p
->
pad_idx
,
filt_ctx
,
pad
,
log_ctx
))
<
0
)
return
ret
;
ret
=
link_filter
(
p
->
filter_ctx
,
p
->
pad_idx
,
filt_ctx
,
pad
,
log_ctx
);
av_free
(
p
->
name
);
av_free
(
p
);
if
(
ret
<
0
)
return
ret
;
}
else
{
p
->
filter_ctx
=
filt_ctx
;
p
->
pad_idx
=
pad
;
...
...
@@ -289,8 +290,10 @@ static int parse_inputs(const char **buf, AVFilterInOut **curr_inputs,
av_free
(
name
);
}
else
{
/* Not in the list, so add it as an input */
if
(
!
(
match
=
av_mallocz
(
sizeof
(
AVFilterInOut
))))
if
(
!
(
match
=
av_mallocz
(
sizeof
(
AVFilterInOut
))))
{
av_free
(
name
);
return
AVERROR
(
ENOMEM
);
}
match
->
name
=
name
;
match
->
pad_idx
=
pad
;
}
...
...
@@ -318,24 +321,27 @@ static int parse_outputs(const char **buf, AVFilterInOut **curr_inputs,
AVFilterInOut
*
match
;
AVFilterInOut
*
input
=
*
curr_inputs
;
if
(
!
name
)
return
AVERROR
(
EINVAL
);
if
(
!
input
)
{
av_log
(
log_ctx
,
AV_LOG_ERROR
,
"No output pad can be associated to link label '%s'.
\n
"
,
name
);
"No output pad can be associated to link label '%s'.
\n
"
,
name
);
av_free
(
name
);
return
AVERROR
(
EINVAL
);
}
*
curr_inputs
=
(
*
curr_inputs
)
->
next
;
if
(
!
name
)
return
AVERROR
(
EINVAL
);
/* First check if the label is not in the open_inputs list */
match
=
extract_inout
(
name
,
open_inputs
);
if
(
match
)
{
if
((
ret
=
link_filter
(
input
->
filter_ctx
,
input
->
pad_idx
,
match
->
filter_ctx
,
match
->
pad_idx
,
log_ctx
))
<
0
)
match
->
filter_ctx
,
match
->
pad_idx
,
log_ctx
))
<
0
)
{
av_free
(
name
);
return
ret
;
}
av_free
(
match
->
name
);
av_free
(
name
);
av_free
(
match
);
...
...
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