mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
avcodec/libxvid: Fix leak of AVPacket on error
Regression since 2101b99777
.
Fixes Coverity issue #1473721.
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
edcbb3e1b9
commit
7f985c2174
@ -692,8 +692,10 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
picture = av_frame_alloc();
|
||||
if (!picture)
|
||||
if (!picture) {
|
||||
av_packet_free(&packet);
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
|
||||
xerr = xvid_encore(NULL, XVID_ENC_CREATE, &xvid_enc_create, NULL);
|
||||
if( xerr ) {
|
||||
|
Loading…
Reference in New Issue
Block a user