[FFmpeg-cvslog] avformat/smoothstreamingenc: fix memleak

Michael Niedermayer git at videolan.org
Sun Jul 6 05:17:37 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jul  6 05:02:38 2014 +0200| [a53c5d454ee608fd539e5c02ade3f246470d1cb2] | committer: Michael Niedermayer

avformat/smoothstreamingenc: fix memleak

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

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

 libavformat/smoothstreamingenc.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/smoothstreamingenc.c b/libavformat/smoothstreamingenc.c
index d47e44f..5a77ec3 100644
--- a/libavformat/smoothstreamingenc.c
+++ b/libavformat/smoothstreamingenc.c
@@ -155,9 +155,10 @@ static void get_private_data(OutputStream *os)
         return;
     os->private_str = av_mallocz(2*size + 1);
     if (!os->private_str)
-        return;
+        goto fail;
     for (i = 0; i < size; i++)
         snprintf(&os->private_str[2*i], 3, "%02x", ptr[i]);
+fail:
     if (ptr != codec->extradata)
         av_free(ptr);
 }



More information about the ffmpeg-cvslog mailing list