diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-02-18 14:31:11 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-02-18 14:31:11 +0100 |
commit | b68d902b6eec9882213ab860ff8a5f27ba49c7a0 (patch) | |
tree | f0c0799e60f738aa91293e02a15c376e700eee64 /libavformat/ffmenc.c | |
parent | c8c10a5fc753af376eaca2c7d5b3cc5a4375f8ac (diff) | |
download | ffmpeg-b68d902b6eec9882213ab860ff8a5f27ba49c7a0.tar.gz |
avformat/ffmenc: Use av_freep() to avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/ffmenc.c')
-rw-r--r-- | libavformat/ffmenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/ffmenc.c b/libavformat/ffmenc.c index cacf0d77d9..10acfbe7a1 100644 --- a/libavformat/ffmenc.c +++ b/libavformat/ffmenc.c @@ -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) |