summaryrefslogtreecommitdiff
authorClément Bœsch <clement.boesch@smartjog.com>2012-11-13 15:32:35 (GMT)
committer Clément Bœsch <ubitux@gmail.com>2012-11-15 10:52:44 (GMT)
commit0e482a8e49f34bd479b8436da9aee75455c9bcb7 (patch)
tree8434f4cdda4606df8f45abfa3a23b470560b7818
parenta9b1536a018b867e3458a278c2992f7cd2fb707d (diff)
downloadffmpeg-0e482a8e49f34bd479b8436da9aee75455c9bcb7.zip
ffmpeg-0e482a8e49f34bd479b8436da9aee75455c9bcb7.tar.gz
ffmpeg-0e482a8e49f34bd479b8436da9aee75455c9bcb7.tar.bz2
ffserver: fix streams and priv_data memleaks when closing a connection.
Diffstat
-rw-r--r--ffserver.c2
1 files changed, 2 insertions, 0 deletions
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;