free c->pb_buffer before overwriting it, fix memleak
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Sat, 21 Jun 2008 06:08:59 +0000 (06:08 +0000)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Sat, 21 Jun 2008 06:08:59 +0000 (06:08 +0000)
Originally committed as revision 13853 to svn://svn.ffmpeg.org/ffmpeg/trunk

ffserver.c

index b53fb04..27c998a 100644 (file)
@@ -754,6 +754,7 @@ static void close_connection(HTTPContext *c)
             /* prepare header */
             if (url_open_dyn_buf(&ctx->pb) >= 0) {
                 av_write_trailer(ctx);
+                av_freep(&c->pb_buffer);
                 url_close_dyn_buf(ctx->pb, &c->pb_buffer);
             }
         }