mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
lavf/tee: fix leak of strdup/strtoked buffer.
Fix CID 1108606.
This commit is contained in:
parent
ab2bfb85d4
commit
59f809e992
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user