diff options
author | Nicolas George <george@nsup.org> | 2013-10-21 16:53:32 +0200 |
---|---|---|
committer | Nicolas George <george@nsup.org> | 2013-10-21 17:32:01 +0200 |
commit | 59f809e9922ad2a8ed5373189e0e2aec0d4dffd7 (patch) | |
tree | 4191748df160557fb8353cf0563da678f512f7fe /libavformat/tee.c | |
parent | ab2bfb85d49b2f8aa505816f93e75fd18ad0a361 (diff) | |
download | ffmpeg-59f809e9922ad2a8ed5373189e0e2aec0d4dffd7.tar.gz |
lavf/tee: fix leak of strdup/strtoked buffer.
Fix CID 1108606.
Diffstat (limited to 'libavformat/tee.c')
-rw-r--r-- | libavformat/tee.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/tee.c b/libavformat/tee.c index 40b59a4be9..171a827b46 100644 --- a/libavformat/tee.c +++ b/libavformat/tee.c @@ -102,10 +102,10 @@ fail: static int parse_bsfs(void *log_ctx, const char *bsfs_spec, AVBitStreamFilterContext **bsfs) { - char *bsf_name, *buf, *saveptr; + char *bsf_name, *buf, *dup, *saveptr; int ret = 0; - if (!(buf = av_strdup(bsfs_spec))) + if (!(dup = buf = av_strdup(bsfs_spec))) return AVERROR(ENOMEM); while (bsf_name = av_strtok(buf, ",", &saveptr)) { @@ -128,7 +128,7 @@ static int parse_bsfs(void *log_ctx, const char *bsfs_spec, } end: - av_free(buf); + av_free(dup); return ret; } |