mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
ffserver: fix streams and priv_data memleaks when closing a connection.
This commit is contained in:
parent
a9b1536a01
commit
0e482a8e49
@ -929,6 +929,8 @@ static void close_connection(HTTPContext *c)
|
|||||||
|
|
||||||
for(i=0; i<ctx->nb_streams; i++)
|
for(i=0; i<ctx->nb_streams; i++)
|
||||||
av_free(ctx->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)
|
if (c->stream && !c->post && c->stream->stream_type == STREAM_TYPE_LIVE)
|
||||||
current_bandwidth -= c->stream->bandwidth;
|
current_bandwidth -= c->stream->bandwidth;
|
||||||
|
Loading…
Reference in New Issue
Block a user