ffserver: dont leak pb_buffer
authorLukasz Marek <lukasz.m.luki2@gmail.com>
Thu, 20 Nov 2014 17:59:58 +0000 (18:59 +0100)
committerLukasz Marek <lukasz.m.luki2@gmail.com>
Wed, 26 Nov 2014 22:32:33 +0000 (23:32 +0100)
ffserver.c

index 012056d..8ef51a1 100644 (file)
@@ -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;