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

Andreas Cadhalpun git at videolan.org
Fri Mar 13 13:22:58 CET 2015


ffmpeg | branch: release/2.6 | Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com> | Mon Mar  9 19:31:39 2015 +0100| [39c9b47bb60946157801ebe73b26dc58b1c6cf2c] | 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=39c9b47bb60946157801ebe73b26dc58b1c6cf2c
---

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

diff --git a/libavformat/asfenc.c b/libavformat/asfenc.c
index f4f64a6..5e0f7b0 100644
--- a/libavformat/asfenc.c
+++ b/libavformat/asfenc.c
@@ -660,6 +660,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