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
32ea6ffb
Commit
32ea6ffb
authored
Jan 27, 2020
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_colorconstancy: fix memory leak on error
Also remove unneeded log message while here.
parent
dfc47148
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
vf_colorconstancy.c
libavfilter/vf_colorconstancy.c
+1
-3
No files found.
libavfilter/vf_colorconstancy.c
View file @
32ea6ffb
...
...
@@ -121,7 +121,6 @@ static int set_gauss(AVFilterContext *ctx)
for
(;
i
>=
0
;
--
i
)
{
av_freep
(
&
s
->
gauss
[
i
]);
}
av_log
(
ctx
,
AV_LOG_ERROR
,
"Out of memory while allocating gauss buffers.
\n
"
);
return
AVERROR
(
ENOMEM
);
}
}
...
...
@@ -223,7 +222,6 @@ static int setup_derivative_buffers(AVFilterContext* ctx, ThreadData *td)
td
->
data
[
b
][
p
]
=
av_mallocz_array
(
s
->
planeheight
[
p
]
*
s
->
planewidth
[
p
],
sizeof
(
*
td
->
data
[
b
][
p
]));
if
(
!
td
->
data
[
b
][
p
])
{
cleanup_derivative_buffers
(
td
,
b
+
1
,
p
);
av_log
(
ctx
,
AV_LOG_ERROR
,
"Out of memory while allocating derivatives buffers.
\n
"
);
return
AVERROR
(
ENOMEM
);
}
}
...
...
@@ -696,7 +694,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
}
else
{
out
=
ff_get_video_buffer
(
outlink
,
outlink
->
w
,
outlink
->
h
);
if
(
!
out
)
{
av_
log
(
ctx
,
AV_LOG_ERROR
,
"Out of memory while allocating output video buffer.
\n
"
);
av_
frame_free
(
&
in
);
return
AVERROR
(
ENOMEM
);
}
av_frame_copy_props
(
out
,
in
);
...
...
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