aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/file.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-11 17:09:57 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-25 21:09:21 +0200
commit8a525e4d18c503e79df3f526006ffbfda7955b39 (patch)
tree9d4c4d383c941ee42a4718b74e5ad6248717aff8 /libavutil/file.c
parent7450a0215ae2242e497a334eef788b1acb581e7e (diff)
downloadffmpeg-8a525e4d18c503e79df3f526006ffbfda7955b39.tar.gz
av_tempfile: fix leak in error case
Fixes CID733796 Part2 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit c9454cb643f5404ca8f4f02e1384c863136f7a9e) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/file.c')
-rw-r--r--libavutil/file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavutil/file.c b/libavutil/file.c
index e59335a77a..ca78505be5 100644
--- a/libavutil/file.c
+++ b/libavutil/file.c
@@ -171,6 +171,7 @@ int av_tempfile(const char *prefix, char **filename, int log_offset, void *log_c
if (fd < 0) {
int err = AVERROR(errno);
av_log(&file_log_ctx, AV_LOG_ERROR, "ff_tempfile: Cannot open temporary file %s\n", *filename);
+ av_freep(filename);
return err;
}
return fd; /* success */