OSDN Git Service
(root)
/
coroid
/
libav_saccubus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
riff: Fix potential memleak.
[coroid/libav_saccubus.git]
/
libavformat
/
riff.c
diff --git
a/libavformat/riff.c
b/libavformat/riff.c
index
e17980a
..
fe6cc55
100644
(file)
--- a/
libavformat/riff.c
+++ b/
libavformat/riff.c
@@
-509,6
+509,7
@@
int ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size)
}
codec->extradata_size = cbSize;
if (cbSize > 0) {
+ av_free(codec->extradata);
codec->extradata = av_mallocz(codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
if (!codec->extradata)
return AVERROR(ENOMEM);