Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
b19bfd6c
Commit
b19bfd6c
authored
Oct 25, 2012
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavd/lavfi: fix leak in case of failure
Jump to the common release code in case of failure.
parent
48ec8b25
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
lavfi.c
libavdevice/lavfi.c
+3
-3
No files found.
libavdevice/lavfi.c
View file @
b19bfd6c
...
@@ -109,7 +109,7 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx)
...
@@ -109,7 +109,7 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx)
if
(
lavfi
->
graph_filename
&&
lavfi
->
graph_str
)
{
if
(
lavfi
->
graph_filename
&&
lavfi
->
graph_str
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
av_log
(
avctx
,
AV_LOG_ERROR
,
"Only one of the graph or graph_file options must be specified
\n
"
);
"Only one of the graph or graph_file options must be specified
\n
"
);
return
AVERROR
(
EINVAL
);
FAIL
(
AVERROR
(
EINVAL
)
);
}
}
if
(
lavfi
->
graph_filename
)
{
if
(
lavfi
->
graph_filename
)
{
...
@@ -118,13 +118,13 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx)
...
@@ -118,13 +118,13 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx)
ret
=
av_file_map
(
lavfi
->
graph_filename
,
ret
=
av_file_map
(
lavfi
->
graph_filename
,
&
file_buf
,
&
file_bufsize
,
0
,
avctx
);
&
file_buf
,
&
file_bufsize
,
0
,
avctx
);
if
(
ret
<
0
)
if
(
ret
<
0
)
return
ret
;
goto
end
;
/* create a 0-terminated string based on the read file */
/* create a 0-terminated string based on the read file */
graph_buf
=
av_malloc
(
file_bufsize
+
1
);
graph_buf
=
av_malloc
(
file_bufsize
+
1
);
if
(
!
graph_buf
)
{
if
(
!
graph_buf
)
{
av_file_unmap
(
file_buf
,
file_bufsize
);
av_file_unmap
(
file_buf
,
file_bufsize
);
return
AVERROR
(
ENOMEM
);
FAIL
(
AVERROR
(
ENOMEM
)
);
}
}
memcpy
(
graph_buf
,
file_buf
,
file_bufsize
);
memcpy
(
graph_buf
,
file_buf
,
file_bufsize
);
graph_buf
[
file_bufsize
]
=
0
;
graph_buf
[
file_bufsize
]
=
0
;
...
...
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