libxvid_rc: fix leaks in ff_xvid_rate_control_init()

Fixes CID733796 Part1
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-10-11 17:05:04 +02:00
parent 4b20b21b8d
commit 229ccce6cc
1 changed files with 2 additions and 0 deletions

View File

@ -57,6 +57,8 @@ int ff_xvid_rate_control_init(MpegEncContext *s){
if (write(fd, tmp, strlen(tmp)) < 0) {
av_log(NULL, AV_LOG_ERROR, "Error %s writing 2pass logfile\n", strerror(errno));
av_free(tmp_name);
close(fd);
return AVERROR(errno);
}
}