[libav-commits] avio: make avio_close NULL the freed buffer

Luca Barbato git at libav.org
Tue Sep 4 15:14:15 CEST 2012


Module: libav
Branch: master
Commit: 30939390775029fa70b8491d570ac6013cd03c71

Author:    Luca Barbato <lu_zero at gentoo.org>
Committer: Luca Barbato <lu_zero at gentoo.org>
Date:      Tue Sep  4 15:04:46 2012 +0200

avio: make avio_close NULL the freed buffer

---

 libavformat/aviobuf.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 0353a17..fb01613 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -762,7 +762,7 @@ int avio_close(AVIOContext *s)
         return 0;
 
     h = s->opaque;
-    av_free(s->buffer);
+    av_freep(&s->buffer);
     av_free(s);
     return ffurl_close(h);
 }



More information about the libav-commits mailing list