diff --git a/ffserver.c b/ffserver.c index 012056dd48..8ef51a1f9c 100644 --- a/ffserver.c +++ b/ffserver.c @@ -2254,6 +2254,7 @@ static int http_prepare_data(HTTPContext *c) c->state = HTTPSTATE_SEND_DATA_TRAILER; } + av_freep(&c->pb_buffer); len = avio_close_dyn_buf(ctx->pb, &c->pb_buffer); c->cur_frame_bytes = len; c->buffer_ptr = c->pb_buffer;