mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-29 22:00:58 +02:00
avcodec/libxvid: Fix leak of AVPacket on error
Regression since 2101b99777860c853ca2321031eb3f4047dc5894. 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…
x
Reference in New Issue
Block a user