[FFmpeg-cvslog] ffserver: fix streams and priv_data memleaks when closing a connection.

Clément Bœsch git at videolan.org
Thu Nov 15 11:52:54 CET 2012


ffmpeg | branch: master | Clément Bœsch <clement.boesch at smartjog.com> | Tue Nov 13 17:32:35 2012 +0200| [0e482a8e49f34bd479b8436da9aee75455c9bcb7] | committer: Clément Bœsch

ffserver: fix streams and priv_data memleaks when closing a connection.

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

 ffserver.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/ffserver.c b/ffserver.c
index 18271ce..1f27237 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -929,6 +929,8 @@ static void close_connection(HTTPContext *c)
 
     for(i=0; i<ctx->nb_streams; i++)
         av_free(ctx->streams[i]);
+    av_freep(&ctx->streams);
+    av_freep(&ctx->priv_data);
 
     if (c->stream && !c->post && c->stream->stream_type == STREAM_TYPE_LIVE)
         current_bandwidth -= c->stream->bandwidth;



More information about the ffmpeg-cvslog mailing list