Commit b68d902b authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/ffmenc: Use av_freep() to avoid leaving stale pointers in memory

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent c8c10a5f
......@@ -137,7 +137,7 @@ static int ffm_write_header_codec_ctx(AVIOContext *pb, AVCodecContext *ctx, unsi
goto fail;
if (buf && strlen(buf)) {
avio_write(tmp, buf, strlen(buf));
av_free(buf);
av_freep(&buf);
need_coma = 1;
}
if ((ret = av_opt_serialize(ctx, 0, SKIP_DEFAULTS | OPT_FLAGS_EXACT, &buf, '=', ',')) < 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment