[FFmpeg-cvslog] avcodec/sonic: fix memleaks

Michael Niedermayer git at videolan.org
Tue Dec 10 14:55:11 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Dec 10 14:42:17 2013 +0100| [ec4d761c745df45ca0d5677e71e62064dbf9cb49] | committer: Michael Niedermayer

avcodec/sonic: fix memleaks

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

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

 libavcodec/sonic.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/sonic.c b/libavcodec/sonic.c
index 3824c1f..bd2d42e 100644
--- a/libavcodec/sonic.c
+++ b/libavcodec/sonic.c
@@ -193,7 +193,7 @@ static int intlist_write(PutBitContext *pb, int *buf, int entries, int base_2_pa
     bits = av_calloc(entries*max, sizeof(*bits));
     if (!bits)
     {
-//        av_free(copy);
+        av_free(copy);
         return AVERROR(ENOMEM);
     }
 
@@ -249,8 +249,8 @@ static int intlist_write(PutBitContext *pb, int *buf, int entries, int base_2_pa
         if (buf[i])
             put_bits(pb, 1, buf[i] < 0);
 
-//    av_free(bits);
-//    av_free(copy);
+    av_free(bits);
+    av_free(copy);
 
     return 0;
 }
@@ -341,7 +341,7 @@ static int intlist_read(GetBitContext *gb, int *buf, int entries, int base_2_par
 
         pos++;
     }
-//    av_free(bits);
+    av_free(bits);
 
     // read signs
     for (i = 0; i < entries; i++)



More information about the ffmpeg-cvslog mailing list