free c->pb_buffer before overwriting it, fix memleak

Originally committed as revision 13853 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Baptiste Coudurier 2008-06-21 06:08:59 +00:00
parent f7d321bc03
commit f8b06be970
1 changed files with 1 additions and 0 deletions

View 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);
}
}