mirror of https://git.ffmpeg.org/ffmpeg.git
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);
|
return AVERROR(ENOMEM);
|
||||||
|
|
||||||
picture = av_frame_alloc();
|
picture = av_frame_alloc();
|
||||||
if (!picture)
|
if (!picture) {
|
||||||
|
av_packet_free(&packet);
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
|
}
|
||||||
|
|
||||||
xerr = xvid_encore(NULL, XVID_ENC_CREATE, &xvid_enc_create, NULL);
|
xerr = xvid_encore(NULL, XVID_ENC_CREATE, &xvid_enc_create, NULL);
|
||||||
if( xerr ) {
|
if( xerr ) {
|
||||||
|
|
Loading…
Reference in New Issue