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:
authorMichael Niedermayer <michaelni@gmx.at>2013-10-22 01:50:04 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-10-22 01:50:07 +0400
commit23c06984995e69d1cdc9ef1d610d6942e970dec6 (patch)
treebd31893f77fa28d6eab2e6e740d21946af0bff6c /libavformat
parentd47e14b53a3908e5bad82e22129bbd175b49e89b (diff)
parentc4e6024adc18df8ff82157227e2b4159f77951f9 (diff)
Merge remote-tracking branch 'cigaes/master'
* cigaes/master: lavf/tee: fix leak of bsfs array. lavf/tee: fix leak of select option. lavf/tee: fix leak of strdup/strtoked buffer. Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/tee.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libavformat/tee.c b/libavformat/tee.c
index 40b59a4be9..12ea0ea27d 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;
}
@@ -280,6 +280,7 @@ static int open_slave(AVFormatContext *avf, char *slave, TeeSlave *tee_slave)
end:
av_free(format);
+ av_free(select);
av_dict_free(&options);
return ret;
}
@@ -302,6 +303,7 @@ static void close_slaves(AVFormatContext *avf)
}
}
av_freep(&tee->slaves[i].stream_map);
+ av_freep(&tee->slaves[i].bsfs);
avio_close(avf2->pb);
avf2->pb = NULL;