[FFmpeg-cvslog] af_channelmap: free old extended_data on reallocation
Janne Grunau
git at videolan.org
Wed Oct 10 13:23:58 CEST 2012
ffmpeg | branch: master | Janne Grunau <janne-libav at jannau.net> | Tue Oct 9 15:41:24 2012 +0200| [1afd7a118fd71536971f991b823c89f1c9e87509] | committer: Janne Grunau
af_channelmap: free old extended_data on reallocation
Prevents writes to freed memory and the leak of the old extended data.
Fixes CID732303.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1afd7a118fd71536971f991b823c89f1c9e87509
---
libavfilter/af_channelmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavfilter/af_channelmap.c b/libavfilter/af_channelmap.c
index 3e945d6..405a9c2 100644
--- a/libavfilter/af_channelmap.c
+++ b/libavfilter/af_channelmap.c
@@ -338,8 +338,8 @@ static int channelmap_filter_samples(AVFilterLink *inlink, AVFilterBufferRef *bu
if (buf->extended_data == buf->data) {
buf->extended_data = new_extended_data;
} else {
- buf->extended_data = new_extended_data;
av_free(buf->extended_data);
+ buf->extended_data = new_extended_data;
}
} else if (buf->extended_data != buf->data) {
av_free(buf->extended_data);
More information about the ffmpeg-cvslog
mailing list