Commit c9454cb6 authored by Michael Niedermayer's avatar Michael Niedermayer

av_tempfile: fix leak in error case

Fixes CID733796 Part2
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 229ccce6
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment