diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-11 19:09:57 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-11 19:09:57 +0400 |
commit | c9454cb643f5404ca8f4f02e1384c863136f7a9e (patch) | |
tree | f0b13f4be0abf1ace63d96ff2dab79cb62d341f7 /libavutil | |
parent | 229ccce6cca7748f53cb4b6a8d035ddce5ac6b72 (diff) |
av_tempfile: fix leak in error case
Fixes CID733796 Part2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/file.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavutil/file.c b/libavutil/file.c index 8dbeab6b0f..5aa4b9c0d1 100644 --- a/libavutil/file.c +++ b/libavutil/file.c @@ -175,6 +175,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 */ |