[FFmpeg-cvslog] asfenc: fix leaking asf->index_ptr on error

Andreas Cadhalpun git at videolan.org
Sat Mar 21 02:30:15 CET 2015


ffmpeg | branch: release/2.5 | Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com> | Mon Mar  9 19:31:39 2015 +0100| [8d853dc341d563543759b22e5ac710f8546c5158] | committer: Michael Niedermayer

asfenc: fix leaking asf->index_ptr on error

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 2c8cff2be4a044c66e4904efa156dafd0d332d25)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8d853dc341d563543759b22e5ac710f8546c5158
---

 libavformat/asfenc.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/asfenc.c b/libavformat/asfenc.c
index fbf6158..58449d8 100644
--- a/libavformat/asfenc.c
+++ b/libavformat/asfenc.c
@@ -664,6 +664,7 @@ static int asf_write_header(AVFormatContext *s)
      * It is needed to use asf as a streamable format. */
     if (asf_write_header1(s, 0, DATA_HEADER_SIZE) < 0) {
         //av_free(asf);
+        av_freep(&asf->index_ptr);
         return -1;
     }
 



More information about the ffmpeg-cvslog mailing list