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
3c29f68b
Commit
3c29f68b
authored
Jan 10, 2018
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/af_aiir: do not leak memory on failure in convert_zp2tf()
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
16ba6a8a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
af_aiir.c
libavfilter/af_aiir.c
+11
-10
No files found.
libavfilter/af_aiir.c
View file @
3c29f68b
...
...
@@ -404,7 +404,7 @@ static int expand(AVFilterContext *ctx, double *pz, int nb, double *coeffs)
static
int
convert_zp2tf
(
AVFilterContext
*
ctx
,
int
channels
)
{
AudioIIRContext
*
s
=
ctx
->
priv
;
int
ch
,
i
,
j
,
ret
;
int
ch
,
i
,
j
,
ret
=
0
;
for
(
ch
=
0
;
ch
<
channels
;
ch
++
)
{
IIRChannel
*
iir
=
&
s
->
iir
[
ch
];
...
...
@@ -412,21 +412,19 @@ static int convert_zp2tf(AVFilterContext *ctx, int channels)
topc
=
av_calloc
((
iir
->
nb_ab
[
0
]
+
1
)
*
2
,
sizeof
(
*
topc
));
botc
=
av_calloc
((
iir
->
nb_ab
[
1
]
+
1
)
*
2
,
sizeof
(
*
botc
));
if
(
!
topc
||
!
botc
)
return
AVERROR
(
ENOMEM
);
if
(
!
topc
||
!
botc
)
{
ret
=
AVERROR
(
ENOMEM
);
goto
fail
;
}
ret
=
expand
(
ctx
,
iir
->
ab
[
0
],
iir
->
nb_ab
[
0
],
botc
);
if
(
ret
<
0
)
{
av_free
(
topc
);
av_free
(
botc
);
return
ret
;
goto
fail
;
}
ret
=
expand
(
ctx
,
iir
->
ab
[
1
],
iir
->
nb_ab
[
1
],
topc
);
if
(
ret
<
0
)
{
av_free
(
topc
);
av_free
(
botc
);
return
ret
;
goto
fail
;
}
for
(
j
=
0
,
i
=
iir
->
nb_ab
[
1
];
i
>=
0
;
j
++
,
i
--
)
{
...
...
@@ -439,11 +437,14 @@ static int convert_zp2tf(AVFilterContext *ctx, int channels)
}
iir
->
nb_ab
[
0
]
++
;
fail
:
av_free
(
topc
);
av_free
(
botc
);
if
(
ret
<
0
)
break
;
}
return
0
;
return
ret
;
}
static
int
decompose_zp2biquads
(
AVFilterContext
*
ctx
,
int
channels
)
...
...
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