mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-09-20 05:16:38 +00:00
avformat/ffmenc: Fix memleak of buf
Fixes CID1257015 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
8087632027
commit
c8c10a5fc7
@ -146,8 +146,8 @@ static int ffm_write_header_codec_ctx(AVIOContext *pb, AVCodecContext *ctx, unsi
|
|||||||
if (need_coma)
|
if (need_coma)
|
||||||
avio_w8(tmp, ',');
|
avio_w8(tmp, ',');
|
||||||
avio_write(tmp, buf, strlen(buf));
|
avio_write(tmp, buf, strlen(buf));
|
||||||
av_free(buf);
|
|
||||||
}
|
}
|
||||||
|
av_freep(&buf);
|
||||||
avio_w8(tmp, 0);
|
avio_w8(tmp, 0);
|
||||||
write_header_chunk(pb, tmp, tag);
|
write_header_chunk(pb, tmp, tag);
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user