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
f8080bd1
Commit
f8080bd1
authored
Mar 28, 2013
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xmv: do not leak memory in the error paths in xmv_read_header()
CC: libav-stable@libav.org
parent
d1016dcc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
xmv.c
libavformat/xmv.c
+8
-4
No files found.
libavformat/xmv.c
View file @
f8080bd1
...
...
@@ -188,8 +188,10 @@ static int xmv_read_header(AVFormatContext *s)
return
AVERROR
(
ENOMEM
);
xmv
->
audio
=
av_malloc
(
xmv
->
audio_track_count
*
sizeof
(
XMVAudioPacket
));
if
(
!
xmv
->
audio
)
return
AVERROR
(
ENOMEM
);
if
(
!
xmv
->
audio
)
{
ret
=
AVERROR
(
ENOMEM
);
goto
fail
;
}
for
(
audio_track
=
0
;
audio_track
<
xmv
->
audio_track_count
;
audio_track
++
)
{
XMVAudioTrack
*
track
=
&
xmv
->
audio_tracks
[
audio_track
];
...
...
@@ -230,8 +232,10 @@ static int xmv_read_header(AVFormatContext *s)
}
ast
=
avformat_new_stream
(
s
,
NULL
);
if
(
!
ast
)
return
AVERROR
(
ENOMEM
);
if
(
!
ast
)
{
ret
=
AVERROR
(
ENOMEM
);
goto
fail
;
}
ast
->
codec
->
codec_type
=
AVMEDIA_TYPE_AUDIO
;
ast
->
codec
->
codec_id
=
track
->
codec_id
;
...
...
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