ffmpeg: fix memory leak in error case
This commit is contained in:
parent
a11a58d4d0
commit
a8ea8cd1d4
@ -401,6 +401,7 @@ AVFormatWriter::Init(const media_file_format* fileFormat)
|
||||
fIOContext = avio_alloc_context(buffer, kIOBufferSize, 1, this,
|
||||
0, _Write, _Seek);
|
||||
if (fIOContext == NULL) {
|
||||
av_free(buffer);
|
||||
TRACE("av_alloc_put_byte() failed!\n");
|
||||
return B_ERROR;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user