avformat/ffmenc: Fix memleak of buf

Fixes CID1257015

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/113/head^2
Michael Niedermayer 10 years ago
parent 8087632027
commit c8c10a5fc7
  1. 2
      libavformat/ffmenc.c

@ -146,8 +146,8 @@ static int ffm_write_header_codec_ctx(AVIOContext *pb, AVCodecContext *ctx, unsi
if (need_coma)
avio_w8(tmp, ',');
avio_write(tmp, buf, strlen(buf));
av_free(buf);
}
av_freep(&buf);
avio_w8(tmp, 0);
write_header_chunk(pb, tmp, tag);
return 0;

Loading…
Cancel
Save