Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas George <george@nsup.org>2013-10-21 18:53:32 +0400
committerNicolas George <george@nsup.org>2013-10-21 19:32:01 +0400
commit59f809e9922ad2a8ed5373189e0e2aec0d4dffd7 (patch)
tree4191748df160557fb8353cf0563da678f512f7fe /libavformat/tee.c
parentab2bfb85d49b2f8aa505816f93e75fd18ad0a361 (diff)
lavf/tee: fix leak of strdup/strtoked buffer.
Fix CID 1108606.
Diffstat (limited to 'libavformat/tee.c')
-rw-r--r--libavformat/tee.c6
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;
}